Fix value returned by get_scroll_size (#2445)

The scroll position was returned instead.
This commit is contained in:
ASR-ASU 2024-05-23 18:12:47 +02:00 committed by GitHub
parent d3f96ec323
commit 9f670e1eb0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -439,9 +439,9 @@ impl crate::RenderedElementBacking for web_sys::Element {
&self,
) -> std::pin::Pin<Box<dyn std::future::Future<Output = crate::MountedResult<PixelsSize>>>>
{
let left = self.scroll_left();
let top = self.scroll_top();
let result = Ok(PixelsSize::new(left as f64, top as f64));
let width = self.scroll_width();
let height = self.scroll_height();
let result = Ok(PixelsSize::new(width as f64, height as f64));
Box::pin(async { result })
}