Skip to content
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

Events from GlobalEventHandlers must dispatch on disabled form elements #15558

Closed
wants to merge 3 commits into from

Conversation

marcoscaceres
Copy link
Contributor

Web Compatibility bugs bonanza... weird failures across all UAs.

I'm thinking I might split this into multiple test based on each interface type.

[FormDataEvent, ["formdata"]],
[KeyboardEvent, ["keydown", "keypress", "keyup"]],
[
MouseEvent,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, some of these mouse ones shouldn't be here... the ones that map to a "click".

@annevk
Copy link
Member

annevk commented Feb 26, 2019

This is great, but it seems to me that you can basically use any interface with any event name (including custom names) and it should work, right? The only special case in the specification is activation behavior (tied to click), but also has some bugs.

And all implementations maintain various event lists that they treat in special ways, which doesn't really match anything.

whatwg/html#2368 tracks this standards-wise. And whatwg/html#4328 is related.

@marcoscaceres
Copy link
Contributor Author

This is great, but it seems to me that you can basically use any interface with any event name (including custom names) and it should work, right?

You are absolutely right. Part of it was simply to figure out what interfaces are not implemented (how I found Firefox was missing FormDataEvent, for instance... maybe it's too indirect?).

Nonetheless, I'm seeing some weird/interesting things... like in Firefox, "cancel", "securitypolicyviolation", and "cuechange" don't fire (will file a bug... trying to figure out why).

Chrome fails on a bunch of drag events, and a few other things. Same with Safari... like you said, it may be complete unrelated to using any interface.

The only special case in the specification is activation behavior (tied to click), but also has some bugs.

I'm currently working on that code, so any pointers to those bugs would be helpful. Our current code has a whitelist of events the can be triggered when a form element is disabled... which is not great, because we keep missing things (e.g., CSS transitions). @smaug---- suggested we maybe just blacklist click() and let other things through.

@annevk
Copy link
Member

annevk commented Feb 26, 2019

Yeah, only handling click in a special way is what the DOM dispatch algorithm does. If that's web-compatible that'd be great. https://bugzilla.mozilla.org/show_bug.cgi?id=1520869 is the bug where Alphan and I investigated this a bit. Corresponding standards issues are in my previous comment.

@marcoscaceres
Copy link
Contributor Author

Thanks for the pointers. I subscribed to the spec bugs to follow along.

@smaug----
Copy link
Contributor

At some point Chrome folks were discussing about blocking some more events, was it *down/*up events. Can't recall the details.

@gsnedders gsnedders closed this Jan 24, 2020
@gsnedders gsnedders deleted the events_disabled branch January 24, 2020 18:06
@gsnedders gsnedders restored the events_disabled branch January 24, 2020 18:49
@Hexcles Hexcles reopened this Jan 24, 2020
@annevk annevk deleted the events_disabled branch November 21, 2022 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants