Intent to Ship: Send Mouse Events to Disabled Form Controls

394 views
Skip to first unread message

Joey Arhar

unread,
Oct 15, 2022, 6:08:34 PM10/15/22
to blink-dev

Contact emails

jar...@chromium.org

Specification

https://github.com/whatwg/html/issues/2368
No changes have been made to the spec yet, but if this launch goes well then we will likely change the HTML spec to reflect this behavior.

Summary

This will make mouse events other than click, mouseup, and mousedown become dispatched on disabled form controls instead of blocking them. It will also stop propagating click, mouseup, and mousedown events to the parents of disabled form controls when the event is targeted at a child of a disabled form control, which is the same behavior that Firefox currently has. A previous attempt at this was not shipped here: https://chromestatus.com/feature/5685077795143680

Here are the previous blink-dev threads:

https://groups.google.com/a/chromium.org/g/blink-dev/c/rhNbsYDBJes/m/Jvmtv6IbBwAJ

https://groups.google.com/a/chromium.org/g/blink-dev/c/KHXNJINUrj0/m/OAAh-sWuAwAJ



Blink component

Blink>DOM

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility



Gecko: Shipped/Shipping

WebKit: No signal

Web developers: Positive

Other signals:

Ergonomics

This change will not be used in tandem with any other APIs. This change will not affect Chrome's performance.



Activation

This change will not be challenging for developers to take advantage of.



Security

I have no security concerns for this change.



WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?



Debuggability

I'm not aware of any event path debugging or disabled attribute debugging that would need to be updated for this change.



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests?

https://wpt.fyi/results/dom/events/Event-dispatch-click.html
https://github.com/web-platform-tests/wpt/pull/32381

Flag name

SendMouseEventsDisabledFormControls

Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=588760

Estimated milestones

109



Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/6128674512830464

This intent message was generated by Chrome Platform Status.

Yoav Weiss

unread,
Oct 17, 2022, 8:33:11 AM10/17/22
to Joey Arhar, blink-dev
On Sun, Oct 16, 2022 at 12:08 AM Joey Arhar <jar...@chromium.org> wrote:

Contact emails

jar...@chromium.org

Specification

https://github.com/whatwg/html/issues/2368
No changes have been made to the spec yet, but if this launch goes well then we will likely change the HTML spec to reflect this behavior.

Summary

This will make mouse events other than click, mouseup, and mousedown become dispatched on disabled form controls instead of blocking them. It will also stop propagating click, mouseup, and mousedown events to the parents of disabled form controls when the event is targeted at a child of a disabled form control, which is the same behavior that Firefox currently has. A previous attempt at this was not shipped here: https://chromestatus.com/feature/5685077795143680


Any details on why that past attempt didn't make it? Any compat issues encountered?
 
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAK6btwK6HEE0ujdJ9rjHChr5FGx3eXOEm4Vvaxo-BFVw5jfQtg%40mail.gmail.com.

Dave Tapuska

unread,
Oct 17, 2022, 12:15:52 PM10/17/22
to Yoav Weiss, Joey Arhar, blink-dev
So the initial attempt was problematic for interop due to mouseup, and mousedown being displaced for the entire event path. I had removed my request to ship in order to address the concerns of other vendors (proposed another 3 milestones to collect more data). It appears this attempt does fix that by not dispatching them. I did not complete the analysis at the time due to changing priorities of projects. I am happy that Joey has spearheaded this work and do support this intent.

dave.

Philip Jägenstedt

unread,
Oct 19, 2022, 12:00:52 PM10/19/22
to Dave Tapuska, Yoav Weiss, Joey Arhar, blink-dev
Will this match the behavior of Firefox exactly?

Is there a test that currently passes in Firefox which will start passing in Chrome when we enable this? https://wpt.fyi/results/dom/events/Event-dispatch-click.html already passes and https://wpt.fyi/results/html/semantics/forms?label=pr_head&max-count=1&pr=32381 is a complex mix of pass/fail, is the expectation to match Firefox exactly?

Also, can you ask for WebKit signals? A thumbs up on a HTML PR from the likely implementer would be a lightweight signal, and another option is https://github.com/WebKit/standards-positions.

Joey Arhar

unread,
Oct 20, 2022, 6:22:16 PM10/20/22
to Philip Jägenstedt, Dave Tapuska, Yoav Weiss, blink-dev
> Is there a test that currently passes in Firefox which will start passing in Chrome when we enable this?

I just added a more specific and concise WPT for this change: https://github.com/web-platform-tests/wpt/pull/36578
The test shows that the event propagation I'm proposing is almost identical to firefox. The only exception is that firefox does not fire pointerdown or pointerup on disabled form controls or their parents. However, chrome already fires pointerup and pointerdown on those elements, so I'm not worried about breaking anything there. You can see for yourself by using jake's demo in chrome and firefox: https://jakearchibald.com/2017/events-and-disabled-form-fields/
I believe that firefox would be ok with firing pointerup and pointerdown, I'll ask them about that.

> Also, can you ask for WebKit signals?

Yoav Weiss

unread,
Oct 25, 2022, 4:58:44 AM10/25/22
to blink-dev, Joey Arhar, Dave Tapuska, Yoav Weiss, blink-dev, Philip Jägenstedt
LGTM1 for (almost) aligning with Gecko. Please file bugs to get us to full alignment.

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Mike Taylor

unread,
Oct 25, 2022, 9:32:33 AM10/25/22
to Yoav Weiss, blink-dev, Joey Arhar, Dave Tapuska, Philip Jägenstedt
LGTM2
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/4cf632de-b3ba-4d78-be41-2cedd2b5a75fn%40chromium.org.


Mike West

unread,
Oct 25, 2022, 10:25:18 AM10/25/22
to Mike Taylor, Yoav Weiss, blink-dev, Joey Arhar, Dave Tapuska, Philip Jägenstedt
LGTM3

-mike


To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAHgVhZWSBm_r69sds3Dy7E%2BN-TGQr700Sgs2vJiGdnsW6BO1Yw%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/4cf632de-b3ba-4d78-be41-2cedd2b5a75fn%40chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
Reply all
Reply to author
Forward
0 new messages