Intent to ship: dom.selection.mimic_chrome_tostring.enabled

172 views
Skip to first unread message

Sean Feng

unread,
Apr 1, 2025, 2:06:21 PM4/1/25
to dev-pl...@mozilla.org

Hi folks, 

As of Firefox 139, I intend to enable dom.selection.mimic_chrome_tostring.enabled by default on all platforms. The pref was originally introduced in https://bugzilla.mozilla.org/show_bug.cgi?id=85686

It allows us to mimic the WebKit/Blink behavior for `window.getSelection().toString()` — specifically:

- When the selection is in a text control, we return the same content with Webkit/Blink.
- We may also return the content serialization for a previously focused text control based on a similar heuristic used in WebKit/Blink.

This allows us to fix some webcompat bugs. 

Bug to turn on by defaulthttps://bugzilla.mozilla.org/show_bug.cgi?id=1954979

Standard: link to the standard: The behaviour is unspecified and there are two open spec issues, https://github.com/w3c/selection-api/issues/83 and https://github.com/w3c/selection-api/issues/7. We are also trying to move the spec issues forward in the meantime. 

Thanks,

Sean


Reply all
Reply to author
Forward
0 new messages