Closed Bug 1600536 Opened 3 years ago Closed 3 years ago

user-select: initial/auto on input works incorrectly


(Core :: DOM: Selection, defect)

70 Branch
Not set



Tracking Status
firefox73 --- verified


(Reporter: abc, Assigned: emilio)




(Keywords: parity-chrome, parity-edge, parity-safari)


(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:70.0) Gecko/20100101 Firefox/70.0

Steps to reproduce:

  1. open on firefox 70.x
  2. login your account
  3. input some text in danmaku sendbar
  4. select some text via mouse or touchpad

Actual results:

text cannot be selected or selected text incorrectly

Expected results:

selected text correctly as mouse or touchpad selected.

more details:
It works fine on Safari, Chrome, Edge.
It seems that issue was caused by parent user-select value.

reproduce video:

Component: Untriaged → DOM: Selection
Product: Firefox → Core
Flags: needinfo?(echen)

I could reproduce this issue, I am still trying to find a minimum test script.

Here is the minimum script:

Per spec,

  • The computed value of auto is determined as follows:
    • On the ::before and ::after pseudo elements, the computed value is none
    • If the element is an editable element, the computed value is contain
    • Otherwise, if the computed value of user-select on the parent of this element is all, the computed value is all
    • Otherwise, if the computed value of user-select on the parent of this element is none, the computed value is none
    • Otherwise, the computed value is text

The computed value of user-select for <input> and <textarea> should be contain which allows selections allow selections to extend across this element. We don't support contain at this moment, I think this is why it doesn't work.

Flags: needinfo?(echen)
See Also: → 1036853

This is not why it doesn't work. Instead of contain we have independent selection for <input> and such.

Is this a regression?

Flags: needinfo?(emilio)
Assignee: nobody → emilio
Ever confirmed: true
Flags: needinfo?(emilio)

This is covered by existing tests, via the removal of the rule in forms.css

Pushed by
user-select: auto on input / textarea should behave as text. r=mats
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
Has Regression Range: --- → yes
Regressed by: 1213126

Not really a regression. Before that you could repro the bug with -moz-user-select instead of the -webkit- variant.

Keywords: regression
No longer regressed by: 1213126
Keywords: regression
Flags: qe-verify+

Confirmed issue with a Nighly build from 2019-12-09.
Managed to verify the fix wit 73.0b11 on macOS 10.15

Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.