-
Notifications
You must be signed in to change notification settings - Fork 12
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
Edge not sending pointercancel #645
Comments
Best workaround so far would be detecting it by polling every frame (for every touch) with setPointerCapture, as it errors out when a pointer isn't active. This doesn't work well, because Edge doesn't error out until you put another finger back down in the sim. Unsure of performance impact. e.g.: // Workaround for not getting pointercancel, see https://github.com/phetsims/scenery/issues/645
if ( platform.edge && pointer.isTouch ) {
var target = this.attachToWindow ? document.body : this.display.domElement;
if ( target.setPointerCapture ) {
try {
target.setPointerCapture( pointer.id );
}
catch ( e ) {
console.log( 'LOST LOST LOST' );
pointer.interruptAll();
this.removePointer( pointer );
}
}
} |
I have yet to receive any Edge bugginess similar to this. |
@jonathanolson considering our usage on Edge (very low), and other priorities, I am marking this a low (quite low). Best to focus on sim work and revisit this question after the summer. |
Understand, unassigning myself. |
@jonathanolson both procedures, tab switching and LoL zooming, are reproducible on my Win 10 Edge. |
Noticed in testing for #619 where the pointer cancel seems to not happen as expected, however the general problem is larger in scope (thus this issue).
How to reproduce:
Expected (e.g. Chrome): pointercancel event fires, which means the particle animates back to the bucket (or to the atom if it's close to the center, because we don't handle the cancel differently yet).
Actual with Edge: Particle is now stuck in that location.
It's also possible to reproduce by:
@phet-steele, can you verify that this isn't just happening only on my Surface device?
In general, in 5 hours of debugging, I have never triggered a pointercancel event on Edge. Certain threads note that preventDefault(), touch-action, setPointerCapture, etc. could be related (w3c/pointerevents#205 (comment)). I've tried out all combinations of these, but still not getting a pointercancel. Enabling certain combinations of things also allows certain default browser behaviors to happen that we don't want to happen.
An independent code sample (https://patrickhlauke.github.io/touch/) also shows the "no pointercancel event" when doing the "switch to another tab".
If this was just the LoL prototype, I'd have bailed, but I'm concerned that switching tabs may be a somewhat common case on Edge. I'm really finding no information specific to this type of bug online, so creating a minimal reproducible example and (a) finding a point where this works, and/or (b) submitting a bug report would be my next options.
@ariel-phet, can you prioritize this?
@oliver-phet, has any user reported Edge bugginess consistent with this?
The text was updated successfully, but these errors were encountered: