Dispatches selectionchange event per element when this element(input/textarea) provides a text selection or its selection changes. This is to match the latest specification of selectionchange event. This also matches Safari behavior.
Interoperability risk is low because Firefox and Safari have shipped this according to the specification. Compatibility risk is low because the selectionchange event targeting input/textarea would bubble up, and existing codes listening on Document will work well as ever.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
Low WebView application risks.
None
https://wpt.fyi/results/selection/onselectionchange-on-distinct-text-controls.html
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).
NoneThe Gecko status is marked as Shipped/Shipping and the Interop/Compat section mentions Firefox having shipped this, but Firefox is still failing the WPTs at https://wpt.fyi/results/selection/onselectionchange-on-distinct-text-controls.html.
Can you help me understand the discrepancy there?
Thanks,
Dan
From: blin...@chromium.org <blin...@chromium.org>
On Behalf Of Shuangshuang Zhou
Sent: Tuesday, May 21, 2024 10:24 PM
To: blink-dev <blin...@chromium.org>
Subject: [blink-dev] Intent to Ship: Dispatch selectionchange event per element
You don't often get email from shuangsh...@intel.com. Learn why this is important |
--
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/de18f3c4-df5a-4423-80ec-e505e0c9fb2bn%40chromium.org.
Yeah, that’s what I was trying to get at – the Intent implies that Gecko has also shipped the breaking change but it seems that might not be the case.
If not, we should send a Request for Position to figure out whether there would be cross-browser alignment on shipping this.
-- Dan
From: Olli Pettay <ope...@mozilla.com>
Sent: Wednesday, May 22, 2024 9:53 AM
To: blink-dev <blin...@chromium.org>
Cc: Daniel Clark <dan...@microsoft.com>; Shuangshuang Zhou <shuangsh...@intel.com>
Subject: Re: [blink-dev] Intent to Ship: Dispatch selectionchange event per element
You don't often get email from ope...@mozilla.com. Learn why this is important |
Yes, agree. Can we please request a position from Mozilla at
https://github.com/mozilla/standards-positions/issues/new?
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/PH8PR00MB1445785C11C8FCA346EAE963C5EB2%40PH8PR00MB1445.namprd00.prod.outlook.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/2d3b76b1-890f-4a07-961a-ef813c14eef3n%40chromium.org.
Thanks Shuangshuang for clarifying what’s going on with these two separate but related changes, and Olli for the update on https://bugzilla.mozilla.org/show_bug.cgi?id=1898343.
Since Gecko already implements the behavior of firing selectionchange on input/textarea (confirmed here), sounds good to me to go ahead with shipping this change in Chromium (I’m not an API owner though).
Separately, for the behavior of not firing duplicate selectionchange, it might not hurt to go ahead and request an official Mozilla position on that since it sounds like there’s still a bit of uncertainty about landing that change given back compat concerns, unless Olli confirms here that the plan is to go ahead and ship it.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/b17e9c59-e826-44e3-9a52-e24067f1cbc9n%40chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/e2d678cb-a4ae-4856-8518-161b8a3ffc38n%40chromium.org.