-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Specify that some synthetic events cause actions #1394
Comments
See also #805. I'm not sure what the plan is here---do we need to formalize the "default action" concept perhaps, and call it "legacy default action", so that all the existing places the spec talks about "default action" are no longer undefined references? It looks like @RByers and @dtapuska are involved in trying to make Chrome match... some spec, not sure which, but at least the general agreement to try to remove as many synthetic click activations as possible. |
whatwg/dom#325 has a plan now by the way. Planning on getting things sorted. Shall we close the bug in favor of this issue? |
SGTM. It's now only |
Note that it is only "MouseEvents" with type "click". We ran into a number of properties that created an "Event" with type "click" that failed in both FireFox and Chrome. But at least we are consistent now. |
Yeah, the PR for DOM only considers |
Just to be clear, whatwg/dom#325 has the plan and refactoring discussion for the dispatch algorithm. whatwg/dom#342 has the patch (review welcome, but will need a couple further tweaks). In HTML we need to make these changes:
Please let me know if you have any concerns with this plan of action. |
User agents have always had special behavior for synthetic click events. This is discussed to great extent in https://www.w3.org/Bugs/Public/show_bug.cgi?id=12230. This change introduces the hooks to no longer make that magical, but an understood and integral part of the processing model, ugly as it is. This changes requires corresponding changes and cleanup in HTML. See whatwg/html#1394 for that discussion. Fixes #325.
Plan SGTM, although I take it "activation behavior" would no longer have a |
Yeah, same for "* activation steps" (and a whole lot of |
User agents have always had special behavior for synthetic click events. This is discussed to great extent in https://www.w3.org/Bugs/Public/show_bug.cgi?id=12230. This change introduces the hooks to no longer make that magical, but an understood and integral part of the processing model, ugly as it is. This changes requires corresponding changes and cleanup in HTML. See whatwg/html#1394 for that discussion. Fixes #325.
The biggest normative change here is that now any click event can cause activation behavior to run. No exceptions. It should be purely editorial otherwise. Fixes #1394.
This aligns firing and dispatching of events with updated terminology in the DOM Standard. Among the changes: * A lot less usage of "default action" which isn't really a thing. Instead we make use of the return value of the fire and dispatch algorithms. * Instead of saying things bubble or are cancelable we initialize the attributes as such. * We no longer re-state defaults for isTrusted, bubbles, and cancelable, as that only leads to confusion when they are *not* re-stated. * We now use the legacy target override flag rather than supplying a named argument. This fixes #1713, but plenty of follow up issues remain: * #805 for the remainder of "default action" usage * #1394 for updating synthetic click events * #1887 for removing "fire a simple event" usage * #1893 for updating when checkboxes get checked * #1900 for figuring out if event dispatch requires more hooks * #1912 for revisiting isTrusted usage * #1913 for updating synthetic mouse events * #1922 for making more events composed
The biggest normative change here is that now any click event can cause activation behavior to run. No exceptions. It should be purely editorial otherwise. Fixes #1394.
There are two major changes here: * Any click event can cause activation behavior to run. No exceptions. * The "click in progress flag" is now restricted to the click() method, as it already is in Firefox. The other changes are editorial: * "Activation behavior" is now associated with an object at all times (and cannot be conditionally associated) * "Legacy-pre-activation behavior" and "legacy-canceled-activation behavior" are now more clearly only relevant for input elements in either the Checkbox or Radio Button state. * Various concepts such as "run synthetic click activation steps" and "nearest activatable element" are gone as they are obsoleted by the DOM Standard or the aforementioned normative changes. Tests related to this change: * web-platform-tests/wpt#3974 * web-platform-tests/wpt#4034 Changes to the DOM Standard that were necessary for this change: * whatwg/dom#342 * whatwg/dom#346 Fixes #1394.
This aligns firing and dispatching of events with updated terminology in the DOM Standard. Among the changes: * A lot less usage of "default action" which isn't really a thing. Instead we make use of the return value of the fire and dispatch algorithms. * Instead of saying things bubble or are cancelable we initialize the attributes as such. * We no longer re-state defaults for isTrusted, bubbles, and cancelable, as that only leads to confusion when they are *not* re-stated. * We now use the legacy target override flag rather than supplying a named argument. This fixes whatwg#1713, but plenty of follow up issues remain: * whatwg#805 for the remainder of "default action" usage * whatwg#1394 for updating synthetic click events * whatwg#1887 for removing "fire a simple event" usage * whatwg#1893 for updating when checkboxes get checked * whatwg#1900 for figuring out if event dispatch requires more hooks * whatwg#1912 for revisiting isTrusted usage * whatwg#1913 for updating synthetic mouse events * whatwg#1922 for making more events composed
There are two major changes here: * Any click event can cause activation behavior to run. No exceptions. * The "click in progress flag" is now restricted to the click() method, as it already is in Firefox. The other changes are editorial: * "Activation behavior" is now associated with an object at all times (and cannot be conditionally associated) * "Legacy-pre-activation behavior" and "legacy-canceled-activation behavior" are now more clearly only relevant for input elements in either the Checkbox or Radio Button state. * Various concepts such as "run synthetic click activation steps" and "nearest activatable element" are gone as they are obsoleted by the DOM Standard or the aforementioned normative changes. Tests related to this change: * web-platform-tests/wpt#3974 * web-platform-tests/wpt#4034 Changes to the DOM Standard that were necessary for this change: * whatwg/dom#342 * whatwg/dom#346 Fixes whatwg#1394.
Refiling https://www.w3.org/Bugs/Public/show_bug.cgi?id=12230 in hope it revives the discussion.
Some synthetic events (e.g. a synthetic click on a checkbox) cause actions (e.g. toggling the state of said checkbox).
The text was updated successfully, but these errors were encountered: