- Infinite dragging of a particular element; for example, scrolling in Google Maps or the sort of 'click and drag' UI of a typical billiards or mini-golf game.
- Relative movement events in general, as used for 'mouse-look' in FPS games.
For the first use-case, it should be pretty easy to deal with. Add a property to the 'mousedown' event called 'relativeMode' (or whatever), initially set to false. If the event-handler sets 'relativeMode' to true, then instead of sending the usual string of 'mousemove' events to elements the cursor moves over, the browser should capture ("freeze") the mouse, hide the cursor, and deliver 'mousedelta' events to the original element (whose x and y properties contain the movement delta from the location of the original mousedown event). When the user lets go of the mouse button, the browser releases the capture and shows the cursor. There's no security issue, because the user is in control of the capture at all times, and can just release the mouse button whenever they want.
The second use-case is a bit more troublesome, but as the Chrome bug linked elsewhere in this thread mentions, "web-pages in full-screen mode effectively own the cursor anyway". Perhaps a similar 'relativeMode' property could be added to the 'fullscreen' event.
- Infinite dragging of a particular element; for example, scrolling in Google Maps or the sort of 'click and drag' UI of a typical billiards or mini-golf game.
- Relative movement events in general, as used for 'mouse-look' in FPS games.
For the first use-case, it should be pretty easy to deal with. Add a property to the 'mousedown' event called 'relativeMode' (or whatever), initially set to false. If the event-handler sets 'relativeMode' to true, then instead of sending the usual string of 'mousemove' events to elements the cursor moves over, the browser should capture ("freeze") the mouse, hide the cursor, and deliver 'mousedelta' events to the original element (whose x and y properties contain the movement delta from the location of the original mousedown event). When the user lets go of the mouse button, the browser releases the capture and shows the cursor. There's no security issue, because the user is in control of the capture at all times, and can just release the mouse button whenever they want.
The second use-case is a bit more troublesome, but as the Chrome bug linked elsewhere in this thread mentions, "web-pages in full-screen mode effectively own the cursor anyway". Perhaps a similar 'relativeMode' property could be added to the 'fullscreen' event.