implement the ::inactive-selection pseudo-element
Categories
(Core :: Layout, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox63 | --- | affected |
People
(Reporter: zjz, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: testcase)
There's no way to tell if a selection is active or inactive from CSS if the developer customises the selection style with ::selection. So it's highly unlikely to see the new pseudo-element dropped from final standards, though it's currently in the working draft stage. I think it's ready to implement the ::inactive-selection pseudo-element now.
Reporter | ||
Comment 1•6 years ago
|
||
https://www.w3.org/TR/css-pseudo-4/#highlight-selectors
Reporter | ||
Updated•6 years ago
|
Comment 2•6 years ago
|
||
I think you can do :-moz-window-inactive::selection, right? But yeah if there's a spec for this it should be easy to implement.
Reporter | ||
Comment 3•6 years ago
|
||
Thank you for the information. However, it doesn't mean exactly the same thing, :-moz-window-inactive means the whole window(i.e. the browser) of the applied element loses the focus, that means div:-moz-window-inactive only takes effects when the whole browser(not just the <div>) loses its focus, while ::inactive-selection take effects when you just focus on any other element. BTW, I find that div:-moz-window-inactive::-moz-selection doesn't work, so is it also a bug?
Reporter | ||
Comment 4•6 years ago
|
||
To carify my previous comment, "any other element" in the above means: an element outside of a document window but inside the browser, for example, the URL bar in the browser.
Updated•6 years ago
|
Comment 5•4 years ago
|
||
Ordinary <div>:
http://www.gtalbot.org/BrowserBugsSection/CSS4Pseudo/inactive-selection-001-manual-new.html
http://www.gtalbot.org/BrowserBugsSection/CSS4Pseudo/inactive-selection-002-manual-new.html
http://www.gtalbot.org/BrowserBugsSection/CSS4Pseudo/inactive-selection-003-manual-new.html
http://www.gtalbot.org/BrowserBugsSection/CSS4Pseudo/inactive-selection-004-manual-new.html
<input>:
http://www.gtalbot.org/BrowserBugsSection/CSS4Pseudo/inactive-selection-005-manual-new.html
http://www.gtalbot.org/BrowserBugsSection/CSS4Pseudo/inactive-selection-006-manual-new.html
http://www.gtalbot.org/BrowserBugsSection/CSS4Pseudo/inactive-selection-007-manual-new.html
http://www.gtalbot.org/BrowserBugsSection/CSS4Pseudo/inactive-selection-008-manual-new.html
<textarea>:
http://www.gtalbot.org/BrowserBugsSection/CSS4Pseudo/inactive-selection-009-manual-new.html
http://www.gtalbot.org/BrowserBugsSection/CSS4Pseudo/inactive-selection-010-manual-new.html
http://www.gtalbot.org/BrowserBugsSection/CSS4Pseudo/inactive-selection-011-manual-new.html
http://www.gtalbot.org/BrowserBugsSection/CSS4Pseudo/inactive-selection-012-manual-new.html
<div contenteditable="true">:
http://www.gtalbot.org/BrowserBugsSection/CSS4Pseudo/inactive-selection-013-manual-new.html
http://www.gtalbot.org/BrowserBugsSection/CSS4Pseudo/inactive-selection-014-manual-new.html
http://www.gtalbot.org/BrowserBugsSection/CSS4Pseudo/inactive-selection-015-manual-new.html
http://www.gtalbot.org/BrowserBugsSection/CSS4Pseudo/inactive-selection-016-manual-new.html
Comment 6•4 years ago
|
||
<input> with select() and blur()
http://www.gtalbot.org/BrowserBugsSection/CSS4Pseudo/inactive-selection-031.html
Error console in Firefox 68.4.1 ESR and in Firefox 74.0a1 buildID=20200129093157 will report that inactive-selection pseudo-element is unknown.
Updated•2 years ago
|
Description
•