Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the scroll event on the web renderer #1602

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

ealmloff
Copy link
Member

@ealmloff ealmloff commented Nov 3, 2023

Fixes a type mismatch that broke the scroll event on the web renderer

@ealmloff ealmloff added bug Something isn't working web relating to the web renderer for dioxus labels Nov 3, 2023
@jkelleyrtp jkelleyrtp merged commit a3e6d0a into DioxusLabs:master Nov 3, 2023
10 checks passed
@ealmloff ealmloff deleted the fix-scroll-web branch November 3, 2023 02:40
@@ -294,7 +294,7 @@ pub fn virtual_event_from_websys_event(event: web_sys::Event, target: Element) -
"select" => Rc::new(SelectionData {}),
"touchcancel" | "touchend" | "touchmove" | "touchstart" => Rc::new(TouchData::from(event)),

"scroll" => Rc::new(()),
"scroll" => Rc::new(ScrollData {}),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to use onscorll, I want to get scollheight, scrolltop, etc. Is there a simple example?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the git version of dioxus you can read those properties from the onmounted event. This was added in #2338

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working web relating to the web renderer for dioxus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants