Canceling mousemove will not prevent text selection or drag-and-drop. Chrome allowed cancelling mousemove events to prevent other APIs like text selection (and even drag-and-drop in the past). This does not match other major browsers; nor does it conform to the UI Event spec: https://w3c.github.io/uievents/#event-type-mousemove Through this feature, the default-action of mousemove becomes none. Text selection and drag-and-drop can still be prevented through cancelling selectstart and dragstart events respectively, which are spec compliant and fully interoperable.
This feature will make Chrome fully interoperable. Chrome is currently failing the corresponding WPT (a part of Interop 2023) while both Mozilla and WebKit have started passing the WPT recently. There is a bit of compat risk. We attempted it twice in the past but had to revert for two different reasons: in 2014 we faced a text-selection regression https://crbug.com/485892 on an app that no longer shows the problem (because app event handling changed), then in 2018 we faced a drag-and-drop regression https://crbug.com/878392 that is irrelevant now (because Chrome drag-and-drop changed). For our current attempt the risk from text-selection remains, and we need to expose the feature to be able to assess the risk. We have added a use-counter and turned on the feature as "experimental" on M121 to observe field data before shipping it.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
None
Shipping on desktop | 122 |
Shipping on Android | 122 |
Shipping on WebView | 122 |
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).
None.--
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/CAB0cuO7reN%2B6Wb_N99jNm_aJY7fhhQ1ncCrh_J_%2BFCLdASm0eg%40mail.gmail.com.
API owners met and discussed this one briefly today. There was agreement that more work needs to be done to demonstrate the compat risk is low enough to ship this breaking change. A few points:
- If you'd like to do a finch trial to gather data (up to stable 1%) we're supportive of that.
- Mike Taylor argued that you're not likely to learn too much useful from a finch trial since people seem not to report bugs for things that fail for a seemingly random 1% of their users, and perhaps the idea of surveying a few sites would be more effective at finding real breakage. Of course UKM + Finch might be a good way to find URLs to test.
- Mike also argued that in his experience, he'd expect sites like mapping apps to have engine-specific conditional code around their event handling, so that increases the risk.
- Philip and I discussed that if there is evidence of real breakage we can't accept, we should propose changing the spec here - it seems like it would be very reasonable if cancelling the first mousemove event in a sequence canceled text selection (just like cancelling the first touchmove prevents scrolling). But if we have reasonable evidence that it's non-breaking, we're happy to just align with WebKit and Gecko for improved interoperability.
- All agreed we're willing to take some risk here to achieve interop quickly and don't want to impose too much of a burden of proof, especially since the severity of breakage is likely low. We just need some more evidence that the risk is manageable.
Perhaps the most pragmatic path would be something like:
- Survey at least 5 sites with mouse drag involving DOM and explain why they're unimpacted (cancelling mousedown? cancelling selectionstart? or just user-select: none?). If you find one that is indeed broken, revisit plan.
- Work with the enterprise team on release notes & plan - i.e. either finch roll out with commitment to killswitch if we get reports of enterprise breakage, or add a policy knob opt-out
- Go for 100% but be prepared to killswitch if there are non-trivial reports of breakage, then revisit with either a migration plan (outreach, blog post) or proposed spec change
WDYT?
> I assume cancelling the mousedown (but not the mousemove) still prevents selection and drag-and-drop in all browsers, is that right? That's the pattern I'd expect is most common. Also, what's the behavior of pointermove for mice today and after this change?I just confirmed that Chrome (and Firefox and Safari too) already prevents both selection and drag-and-drop when mousedown or pointerdown is cancelled. So sites canceling all the mouse events will work fine.
> We have landed a metric which specifically checks for cases where the mousemove is preventDefaulted but a selection starts (i.e. selectstart wasn't prevented, there was no user-select: none, and so the selection does change). Right now this is a UMA but we could also add UKM and get sites from this. Mustaq WDYT about adding UKM for this and running the 1% finch trial?Adding UKM and running a 1% finch trial sounds good.Perhaps we can run a Canary/Dev/Beta trial even now (on M121)?
On Wed, Dec 6, 2023 at 12:34 PM Robert Flack <fla...@chromium.org> wrote:On Wed, Dec 6, 2023 at 12:18 PM Rick Byers <rby...@chromium.org> wrote:API owners met and discussed this one briefly today. There was agreement that more work needs to be done to demonstrate the compat risk is low enough to ship this breaking change. A few points:
- If you'd like to do a finch trial to gather data (up to stable 1%) we're supportive of that.
- Mike Taylor argued that you're not likely to learn too much useful from a finch trial since people seem not to report bugs for things that fail for a seemingly random 1% of their users, and perhaps the idea of surveying a few sites would be more effective at finding real breakage. Of course UKM + Finch might be a good way to find URLs to test.
We have landed a metric which specifically checks for cases where the mousemove is preventDefaulted but a selection starts (i.e. selectstart wasn't prevented, there was no user-select: none, and so the selection does change). Right now this is a UMA but we could also add UKM and get sites from this. Mustaq WDYT about adding UKM for this and running the 1% finch trial?
- Mike also argued that in his experience, he'd expect sites like mapping apps to have engine-specific conditional code around their event handling, so that increases the risk.
- Philip and I discussed that if there is evidence of real breakage we can't accept, we should propose changing the spec here - it seems like it would be very reasonable if cancelling the first mousemove event in a sequence canceled text selection (just like cancelling the first touchmove prevents scrolling). But if we have reasonable evidence that it's non-breaking, we're happy to just align with WebKit and Gecko for improved interoperability.
Agreed, though it may be breaking for other engines to change behavior too though, right? E.g. we are in a similar situation with overscroll-behavior on the root element (crbug.com/954423) where changing either behavior to the other will have compat risk.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAB0cuO4KQ%3DcN7O6eE70AWuw-y-Q7LtR_TiZTYrvz8giVfdQrNA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAB0cuO5AOvd%3DjxHVkps8%3DfuWcaX4hpCXY46rYvmGW8H2hNiChw%40mail.gmail.com.
LGTM3
/Daniel
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOmohSK4LBKQjCx_MPzdGzCnpAy4mDbfQxB27Mt73Ahb%2BXE-HA%40mail.gmail.com.