Closed Bug 1600536 Opened 4 years ago Closed 4 years ago

user-select: initial/auto on input works incorrectly

Categories

(Core :: DOM: Selection, defect)

70 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla73
Tracking Status
firefox73 --- verified

People

(Reporter: abc, Assigned: emilio)

References

()

Details

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

Attachments

(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 https://www.bilibili.com/video/av77577858?spm_id_from=333.851.b_7265706f7274466972737431.7 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:
https://www.youtube.com/watch?v=lmrp4lt_9gg

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: https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=7528

Per spec, https://drafts.csswg.org/css-ui-4/#valdef-user-select-auto

  • 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
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(emilio)

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

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/964b6feba6a4
user-select: auto on input / textarea should behave as text. r=mats
Status: ASSIGNED → RESOLVED
Closed: 4 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

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

Attachment

General

Created:
Updated:
Size: