Closed Bug 1043392 Opened 10 years ago Closed 3 years ago

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

Categories

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

29 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jan_nitsche, Unassigned)

References

Details

(Keywords: regression, testcase)

Attachments

(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: http://jsfiddle.net/cSP4f/1/
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)
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=d58545aaeab9&tochange=862cb6a1cc88

=> Bug 933483

stuck alert => current behavior regressed per:
Last good revision: 7e79536aca0a
First bad revision: b9cf7a013b62
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=7e79536aca0a&tochange=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
Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: DOM → DOM: Core & HTML

This is a very old bug which does not occur anymore in the meantime. I'm not sure how to close this though.

Flags: needinfo?(htsai)

(In reply to Jan N from comment #7)

This is a very old bug which does not occur anymore in the meantime. I'm not sure how to close this though.

Thank you for visiting this old bug and verifying.

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(htsai)
Resolution: --- → FIXED
Resolution: FIXED → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: