You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Click and drag the triangle and move your mouse off the window
The triangle stops dragging when the mouse leaves the window
Expected behavior
The triangle should keep dragging even with the mouse off the window
Screenshots
firefox_qLVcHJKFpk.mp4
The triangle stops rotating when the mouse goes off the screen, even though the mouse is held down
Desktop (please complete the following information):
All
Smartphone (please complete the following information):
All
Additional context
Event listeners registered on document.body will continue to give mousemove/touchmove events even with the cursor off the screen, but eframe only registers event listeners on the canvas element.
This registers event listeners on the canvas element, but after mousedown/touchdown, event listeners need to be registered on the document element in order to continue receiving mousemove events as the mouse goes off the screen.
Describe the bug
While dragging in the web demo if the mouse goes off the window egui stops receiving mouse events
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The triangle should keep dragging even with the mouse off the window
Screenshots
firefox_qLVcHJKFpk.mp4
The triangle stops rotating when the mouse goes off the screen, even though the mouse is held down
Desktop (please complete the following information):
All
Smartphone (please complete the following information):
All
Additional context
Event listeners registered on document.body will continue to give mousemove/touchmove events even with the cursor off the screen, but eframe only registers event listeners on the canvas element.
egui/crates/eframe/src/web/events.rs
Lines 256 to 315 in 083d61f
This registers event listeners on the canvas element, but after mousedown/touchdown, event listeners need to be registered on the document element in order to continue receiving mousemove events as the mouse goes off the screen.