If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Selection.selectAllChildren() throws NS_ERROR_FAILURE exception if called in mousedown handler and current selection is in a contenteditable

UNCONFIRMED
Unassigned

Status

()

Core
Selection
UNCONFIRMED
2 years ago
10 months ago

People

(Reporter: Duan Yao, Unassigned)

Tracking

38 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
Created attachment 8627560 [details]
selectAllChildren_moz_exception.html

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0
Build ID: 20150511103818

Steps to reproduce:

1. Call Selection.selectAllChildren() in a mousedown event handler.
2. Select some text in a contenteditable element.
3. Trigger a mousedown event by mouse.

You can use the attachment to reproduce.


Actual results:

NS_ERROR_FAILURE exception is thrown from Selection.selectAllChildren() 


Expected results:

No exception should be thrown, selectAllChildren() should work as normal.
You need to log in before you can comment on or make changes to this bug.