Open Bug 1327831 Opened 7 years ago Updated 2 years ago

Doubleclick doesn't start words selection in contenteditable element if mouse isn't placed over word

Categories

(Core :: DOM: Editor, defect, P3)

defect

Tracking

()

People

(Reporter: arni2033, Unassigned)

Details

>>>   My Info:   Win7_64, Nightly 49, 32bit, ID 20160526082509
STR_1:
1. Open url [1]
2. Move mouse 10px to the right from the last word in contenteditable element (1st element)
3. DoubleClick
 (bonus - there's already bug, but you can wait 2 seconds(!) and continue)
4. DoubleClick without releasing left mouse button in the end, i.e. mousedown-mouseup-mousedown
5. Move mouse to the beginning of contenteditable element   

> [1] data:text/html,<div style="border:solid 1px black; outline:none" contenteditable="">asdf 1234 zxcv</div><input value="asdf 1234 zxcv"><br><textarea>asdf 1234 zxcv</textarea><br>asdf 1234 zxcv

AR:  Caret appears in contenteditable element, and that's it
ER:  Step 3 - the last word should be selected. Try it in 3 other elements (input, textarea, textnode)
     Step 5 - all text in contenteditable should be selected. Try it in 3 other elements

Notes:
1) Surprisingly, triple click in contenteditable element (to select all line) works fine.
2) Social networks (fb.com, vk.com) and mail services use contenteditable elements
3) Chrome has some bugs with all elements in testcase, except textnode. In my opinion this is
   not an excuse to keep this bug in Firefox (probably it is, but for me, it's not).
   IE has consistent result in all elements.
No longer blocks: 1277113
Component: Untriaged → Editor
Product: Firefox → Core
Priority: -- → P3

Still reproducible in v89.

Another test-case:

  1. Open the following data-URI:
    data:text/html,<div contenteditable=true style="height: 100%">abc def</div>
  2. Double-click in the middle of the page (i.e. anywhere except over the text).
  3. The last word "def" should be selected.

It works as expected in Blink browsers, but Fx doesn't select nothing.

Fx works as expected with textarea and with input type=text, but not with contendeditable elements as in the given example.

Surprisingly, Fx works as expected in contendeditable for triple-click (selects the entire line). The bug is only for double-click (word selection).

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.