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
Difference between region behavior for MouseEvent and Touch #548
Comments
So, in general I agree it would be cleaner to share as much as possible except the capture model. The only thing we should check is if Firefox actually implements the different models. If it does not implement the differences, then yeah, we should just fix this. Do you have some quick test cases we could use? |
I don't really know anything about these APIs (just doing API owner research for the blink intent-to-ship), @junov WDYT? |
@foolip WDYT? |
@smaug---- you have looked at touch events, no? @cabanier, any insights? |
I haven't taken the time to understand the details of rerouting, but I do think it would be nice if both I also see a bit of monkey-patching in "When a |
I haven't looked at the hit-region API too much, and looks like the implementation in Gecko is still behind canvas.hitregions.enabled pref (default to false). And also the implementation in Chrome is behind a flag, so it should be still fine to change the API, especially if we can simplify it. And better to do that before anyone ships the API. In general I'm not too happy the API adding .region to MouseEvent and Touch Comment to @foolip, script initiated events shouldn't usually trigger any default handling or such. |
@foolip it is monkey patching "hit testing" which is part of layout in a way and I think fits most in CSS, but they have not worked on this. It's basically the primitive, |
For context, this spec issue was triggered by an Intent to Ship: Canvas Hit Regions on blink-dev. I think @RByers said somewhere he was going to be away for a bit. @junov, do you have a handle on all of these issues and how it should be resolved? Where does the retargeting happen in Blink, and can that be the only place that finds a region from a location? (Now |
FYI, Blink and Mozilla haven't implemented 'event-rerouting' by hit region's control yet. [1] https://www.w3.org/TR/2dcontext/#hit-region @RByers,
@foolip, @smaug----
|
It is surprising to follow a https://www.w3.org/TR/* spec when there is an actively maintained WhatWG spec for the same thing.
|
FWIW, I'm inclined to remove the feature from the specification given that nobody has shipped anything here thus far and there's disagreement over how it should work. I'd rather remove something that is known to be incorrect and not shipped than keep it in place and hope for updates. And to be fair, we've been doing the latter for nine months now. Thoughts? |
Looks like @romandev @junov, are you still pursuing this in Blink? It looks like https://bugzilla.mozilla.org/show_bug.cgi?id=1129147 is the Gecko bug. I can't find Milan Sreckovic on GitHub. @ehsan @cabanier, do you know if anyone's working to get this shipping? |
Since this is a new feature under semi-active development, I'd support removing it from the spec and (assuming people are still interested in pursuing it) iterating on it via incubation instead. |
That would be a fine outcome I think. If the feature can be sensibly described in a standalone doc then HTML could add integration points to limit monkey patching. Or if it requires deep integration it could be maintained as a fork of this repo. |
Basically someone would have to write a PR that adds the feature back in, minus the flaws. Could maybe be a monkey patch for a while, similar to the OffscreenCanvas work. |
Assuming incubation doesn't mean shipping, this sounds ok to me. |
As currently defined the feature has a number of objections due to it altering hit testing without there being a real need to do so. The API can also be simplified to only work with elements rather than accommodating arbitrary objects. Fixes #548. Closes #547, closes #849, and closes #1029, due to hit regions requiring a fresh PR. #1030 is the follow-up issue for new hit region work.
As currently defined the feature has a number of objections due to it altering hit testing without there being a real need to do so. The API can also be simplified to only work with elements rather than accommodating arbitrary objects. Fixes #548. Closes #547, closes #849, and closes #1029, due to hit regions requiring a fresh PR. #1030 is the follow-up issue for new hit region work.
As currently defined the feature has a number of objections due to it altering hit testing without there being a real need to do so. The API can also be simplified to only work with elements rather than accommodating arbitrary objects. Fixes whatwg#548. Closes whatwg#547, closes whatwg#849, and closes whatwg#1029, due to hit regions requiring a fresh PR. whatwg#1030 is the follow-up issue for new hit region work.
I'm comparing the spec for the
region
property forMouseEvent
andTouch
and there are some surprising differences:Touch
is defined with an implicit capture model ("when T was first placed on the surface") instead of based on the current location - that matches the semantics of TouchEvent (which do a hit-test only at touchstart time).Touch
due only to issue TouchInit should be augmented to add 'region' #547 - hopefully fixing that will make the two similar in this regard.MouseEvent
case have "rerouting" support butTouch
doesn't?MouseEvent
talk about setting the "control" butTouch
doesn't?Can't these two cases be defined using shared spec text for everything except the capture model (when exactly the region is determined)?
The text was updated successfully, but these errors were encountered: