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.