Open Bug 1243055 Opened 8 years ago Updated 2 years ago

Text selection with Ctrl+A in inputs and textareas isn't cancelled in a normal way, so the first text selection with mouse fails

Categories

(Core :: Layout: Form Controls, defect, P4)

defect

Tracking

()

Tracking Status
firefox47 --- affected

People

(Reporter: arni2033, Unassigned)

References

()

Details

(Keywords: testcase)

>>>   My Info:   Win7_64, Nightly 46, 32bit, ID 20160121030208
STR_1:
1. Open the following "data:" url or click URL in the form above
>   data:text/html,<textarea>asdf</textarea><br><br><br><input value="zxcv">
2.A) Click in the textarea, select all text in textarea with Ctrl+A
2.B) Select all text in textarea with mouse
3. Click outside the textarea
4. Select all text in textarea with mouse:
 4.1. Hover mouse over the right side of letter "f" in textarea
 4.2. Hold left mouse button
 4.3. Move mouse to the left side of letter "a" in textarea
 4.4. Release left mouse button.

Result:        Scenario (A) completely fails: after Step 4 text selection is canceled(!)
Expectations:  After Step 4 all text in textarea should be selected, just like in scenario (B)

Note: I saw similar mechanism in bug 1171426, but I don't know what have caused it there.
See Also: → 1171426
(!!!) Step 4.1. is incorrect. The corrected Step 4.1:
  4.1. Move mouse pointer ~20px to the right from the right side of letter "f" in textarea

My use case is:
 I select all text in textarea/input with Ctrl+A -> copy it -> then click somewhere else (textarea
 looses focus, text looks not selected) -> when I need that text again, I want to select it
 with mouse: mousedown on a free space, then mousemove, then mouseup =>
 => but I fail, as described in comment 0.

Here's reduced STR_2 which also fails:
1. Open the following "data:" url or click URL in the form above
>   data:text/html,<textarea>asdf</textarea><br><br><br><input value="zxcv">
2.C) Click in the textarea, select all text in textarea with Ctrl+A
2.D) Select all text in textarea with mouse
3. Try to select all text in textarea with mouse:
 3.1. Move mouse pointer ~20px to the right from the right side of letter "f" in textarea
 3.2. Hold left mouse button
 3.3. Move mouse to the left side of letter "a" in textarea
 3.4. Release left mouse button.

AR_2: (C) fails, (D) is OK
ER_2: (C) should be OK too

Here's a screencast of (A) and (B) from STR_1 if it's still not clear:
> screencast:   https://dl.dropboxusercontent.com/s/lr6q48qd2k7gql9/screencast%201%20-%20Text%20selection%20with%20Ctrl%2BA%20breaks%20first%20text%20selection%20with%20mouse.webm?dl=0
Yeah, Chrome does a better job here IMO.
I also note that Chrome shows the <textarea> selection in "secondary color"
(greyed out) when it's not focused.  STR:
1. click on the textarea
2. CTRL+A
3. SHIFT+Tab (to focus the URL bar)
This is a good thing since it tells the user that he can drag that text
using the mouse.  Firefox doesn't seem to show secondary selection anymore
for some reason (at least not on Linux).
(Note that Chrome starts dragging also when the mousedown occurs beside
the text, if there is a selection (primary or secondary) indicated)
Severity: normal → minor
Has STR: --- → yes
Keywords: testcase
OS: Unspecified → All
Priority: -- → P4
Hardware: Unspecified → All
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.