Open Bug 1308698 Opened 8 years ago Updated 2 years ago

Selectability of text inside text fields should always be controllable via user-select property

Categories

(Core :: Layout: Form Controls, defect)

defect

Tracking

()

Tracking Status
firefox52 --- wontfix

People

(Reporter: xidorn, Unassigned)

Details

Currently, it is not possible to select text inside disabled text fields (bug 195361), regardless of value of -moz-user-select. Although I don't think disabled text fields should be selectable by default, I do think authors and users should be able to control that behavior somehow. Doing that in CSS would allow them to choose the behavior they want. (We may want the same control for other form fields like buttons) For text fields, it seems the main place which stops text inside from being selecting is display selection of selection controller. It is currently set to SELECTION_OFF for disabled text control. [1][2] Even if the code setting it to SELECTION_OFF is removed, the value of display selection would still be SELECTION_HIDDEN, which causes the selection to be invisible when the element is not focused. Since disabled text field is not focusable, the selection would never be displayed. (That raises another issue: text copy would not work for non-focused text field, so even if text can be selected, and the selection is displayed, you still cannot do anything to it, which sounds unfortunate. Probably that would require a more thorough implementation of user-select.) [1] https://dxr.mozilla.org/mozilla-central/rev/49fe455cac957808ed4a5d1685c3a1938dac1d31/dom/html/nsTextEditorState.cpp#1427-1428 [2] https://dxr.mozilla.org/mozilla-central/rev/49fe455cac957808ed4a5d1685c3a1938dac1d31/layout/forms/nsTextControlFrame.cpp#1152
Mass wontfix for bugs affecting firefox 52.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.