select or highlight the text in the article causes the text invisible (due to missing ::-moz-selection rule)

RESOLVED FIXED

Status

()

defect
P3
normal
RESOLVED FIXED
a year ago
11 months ago

People

(Reporter: ywu, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(firefox59 affected)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

a year ago
User agent:
FF 57.0.3 (64-bit)
MACOS

Steps to reproduce:

1. load an article from https://www.businesstoday.com.tw/article/category/80392/post/201712250014
2. select or highlight the texts in the article

result: the selected texts are unreadable
expected result: the selected texts are highlight
(Reporter)

Comment 1

a year ago
Posted file webpage.zip
backup the page
The page has a ::selection { background-color: <some-red> }, but no ::-moz-selection equivalent.

I wonder if we should just unprefix ::-moz-selection.
Cam, wdyt of unprefixing ::-moz-selection, aliasing ::-moz-selection to ::selection at parse-time?

We could do the same as for ::placeholder, where we keep both, but honestly I expected to be able to remove the complexity ::placeholder introduces eventually (maybe at the same time?).
Flags: needinfo?(cam)
Summary: select or highlight the text in the article causes the text invisible → select or highlight the text in the article causes the text invisible (due to missing ::-moz-selection rule)
What's the status and interoperability of ::selection in other browsers, and how well does our implementation match what's in css-pseudo-4 right now?  That information should help us decide whether to unprefix as is.

https://drafts.csswg.org/css-pseudo-4/#highlight-selectors
Flags: needinfo?(cam) → needinfo?(emilio)
So, re. css-pseudo-4, the spec doesn't say much. We don't support ::inactive-selection, but nor do other browsers that ship it unprefixed.

I don't know of any interop issues with the current ::selection implementation. I've searched a bit bugzilla and such and no relevant bugs, and caniuse[1] only mentions in known issues:

> In Safari ::selection styles do not work in combination with CSS multi-column.

[1]: https://caniuse.com/#feat=css-selection
Flags: needinfo?(emilio) → needinfo?(cam)
It would be good to see some tests just to confirm that we are implementing what the other browsers do, particularly in terms of which properties are supported in ::selection (which I think would be the biggest potential source of compat issues).

David may also remember whether there's any particular reason we haven't already unprefixed.
Flags: needinfo?(cam) → needinfo?(dbaron)
[ Triage 2017/02/20: P3 ]
Priority: -- → P3
See Also: → 1448670
See Also: → 509958
Fixed in bug 509958.
Status: NEW → RESOLVED
Last Resolved: 11 months ago
Flags: needinfo?(dbaron)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.