-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
touchend listener on document prevents listening for clicks on dom elements (web) #4752
Comments
The reason This should only be a problem if the button overlaps the canvas, due to egui/crates/eframe/src/web/events.rs Lines 529 to 532 in 770c82a
egui/crates/eframe/src/web/events.rs Lines 425 to 427 in 770c82a
The |
@emilk Makes sense! I'll try to implement this |
…_point (emilk#4775) * Closes emilk#4752 To test, start the web demo and follow the repro steps from emilk#4752
Describe the bug
Egui is registering a
touchend
event listener on the document and is calling preventdefault on the event. This prevents any touch interactions with dom elements shown on top of the canvas.To Reproduce
Paste the following in the console on egui.rs (to create a simple html dialog):
Clicking the button now does nothing. (Make sure you enabled the device toolbar and set it to e.g. iPhone SE)
If we forcefully remove the egui touchend listener from document via
the button will become clickable.
Expected behavior
Egui shouldn't interfere with other dom elements. Maybe the touchend listener doesn't need preventDefault or it could be made configurable.
Additional context
The listener is added here:
egui/crates/eframe/src/web/events.rs
Line 92 in af404fe
The text was updated successfully, but these errors were encountered: