Open Bug 1043392 Opened 5 years ago Updated 7 months ago

Firefox highlights text as if mouse is pressed and held when executing JavaScript containing an alert()


(Core :: DOM: Core & HTML, defect)

29 Branch
Windows 7
Not set




(Reporter: jan_nitsche, Unassigned)



(Keywords: regression, testcase)


(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 (Beta/Release)
Build ID: 20140605174243

Steps to reproduce:

I created a JavaScript function that triggers an alert() and a click() event after a certain form element was checked:

In a form, I have two radio buttons, let's say "Yes" and "No". If "Yes" is clicked, a textarea is being focused, because a comment in this area is mandatory when "Yes" is clicked. Therefore, when blurring the textarea while it is empty, an error message (alert) is called, and the other radio button "No" is clicked.

The problem: After closing the alert window, it seems the "mouseup" event was not fired on the document, because when I move the mouse (without clicking or holding the mouse button down), the page's text is highlighted.

I have reproduced a simple example here:
To reproduce the bug:
Click on "Yes", blur the textarea without entering any text (by clicking on an empty point of the page), close the alert message and move the mouse around.

This bug does possibly not apply in older Firefox versions (not tested yet).

Actual results:

I closed the alert message by clicking on "OK", and the text is highlighted while moving the mouse until another click is performed

Expected results:

No text highlighting
Summary: Firefox highlights text as if mouse was clicked when executing JavaScript containing an alert() → Firefox highlights text as if mouse is pressed and held when executing JavaScript containing an alert()
WFM => stuck alert regressed per:
Last good revision: d58545aaeab9 (2013-12-17)
First bad revision: 862cb6a1cc88 (2013-12-18)

=> Bug 933483

stuck alert => current behavior regressed per:
Last good revision: 7e79536aca0a
First bad revision: b9cf7a013b62

=> Bug 959585
Blocks: 933483, 959585
Component: Selection → DOM
Keywords: regression, testcase
Version: 30 Branch → 29 Branch
Attached file Reporter's Testcase (obsolete) —
prompts.tab_modal.enabled = false helps
(In reply to XtC4UaLL [:xtc4uall] from comment #2)
> Created attachment 8463085 [details]
> Reporter's Testcase

The attachment does not work since loading jQuery from a different domain is blocked. Can you possibly edit the attachment by including the jQuery code directly?
Attached file Reporter's Testcase
Attachment #8463085 - Attachment is obsolete: true
Ever confirmed: true
Duplicate of this bug: 1241381
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.