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




5 years ago
3 years ago


(Reporter: jan_nitsche, Unassigned)


({regression, testcase})

29 Branch
Windows 7
regression, testcase
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)



(1 attachment, 1 obsolete attachment)



5 years ago
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


5 years ago
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

Comment 3

5 years ago
prompts.tab_modal.enabled = false helps

Comment 4

5 years ago
(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?
Created attachment 8463856 [details]
Reporter's Testcase
Attachment #8463085 - Attachment is obsolete: true


5 years ago
Ever confirmed: true


3 years ago
Duplicate of this bug: 1241381
You need to log in before you can comment on or make changes to this bug.