Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Could we ever do implicit capture for all pointer types? #125
In #8 we're discussing doing implicit capture for touch. At the hackathon we discussed the "crazy" idea of doing implicit capture for all pointer types and agreed it would almost certainly be too breaking to change long-standing mouse event behavior (and any other option we could think of would be fraught with problems).
But I'm still wondering if there might still be some long-term path here (i.e. not something I'd want to couple to shipping pointer events in Chrome in the first place, but a possible transition later).
To help provide some data on this question @scottgonzalez wrote this Chrome extension. You can try it out by using the "download zip" option in GitHub, unzip to a folder, then "load unpacked extension" in chrome://extensions. After a few minutes of playing on major sites I haven't yet found an issue. I'm sure there's tons of breakage out there, but still maybe it's not as intractable as we thought?
Note that Chrome doesn't yet alter hit-testing during capture for mouse - only for touch. So this isn't a complete test.
One thing that would break for sure is :hover styles during dragging, but maybe some rationalization will come out of #123 that would help.
Long term, if we imagine a world where >80% of web usage is via a phone (we're already at >50% by many measures) then maybe eventually changing the long-standing model of mouse isn't entirely insane?
referenced this issue
Jul 29, 2016
Not necessarily, I think we could have the built-in drag-and-drop still work when captured. More challenging is perhaps HTML5 DnD APIs. That appears to still work with the extension, but probably only because we still have the boundary events (not yet modifying hit-test during capture for mouse).
Here's one possible compromise that's more rational that the touch/mouse split. We could state that drag and drop has the effect of releasing pointer capture (although we'd have to specify that this is ALL dragging as triggered as the default action of mousedown, not just HTML5 DnD where elements opt-in with
Personally I was shocked that I didn't come across a single site impacted by this by running with Scott's extension enabled for a month or so. Maybe it's not so hopeless? Or at least if we're going to close it, we should perhaps have at least ONE example of a real-world website that's significantly broken by it? Thoughts?
Regardless it's definitely NOT v2 - more crazy idea to consider for the future.