Closed Bug 291212 Opened 20 years ago Closed 3 years ago

Onblur alert dialogue hangs browser on alt-tab to switch windows

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: livinglaser, Unassigned)

Details

(Whiteboard: DUPEME)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3 If you put an onblur() event handler on an input box that creates an alert(), then user the alt+tab combination to switch to another windows application, the alert comes up when the window does not have focus. This seems to cause problems for the browser as the alert cannot be dismissed easily, nor can the browser window be closed. Reproducible: Always Steps to Reproduce: 1.Create an html page like this: <html> <body> <h1>test case</h1> <p> <form> <input onblur='alert("hi, mom")' > <p> <input onblur='alert("hi, sis")' > </form> </body> </html> 2. Open page in firefox, windows XP (could not reproduce on my linux box) 3. Select one of the input boxes, enter some text 4. User alt+tab to switch to another windows application 5. Return to the firefox window and attempt to interact with window Actual Results: The dialogue could only be dismissed by using the escape key. Even then, I had to alt-tab to a different application, then alt-tab back to firefox to actually do anything on the form Expected Results: The dialogue should either not have been produced (no onblur on alt+tab to switch windows) or else should have been dismissable as normal
Attached file test case
This does not exactly act as told. I can interact with it. I only have a second one appear. But when i dismiss the seconde one everything is ok. So this works for me using Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.7) Gecko/20050414 Firefox/1.0.3
Severity: critical → major
Component: General → Event Handling
Product: Firefox → Core
Version: unspecified → 1.7 Branch
When using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050419 Firefox/1.0+ it gives i funny behavior then i tested again with Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.7) Gecko/20050414 Firefox/1.0.3 and i get the bug. So finally i can reproduce this : After coming back to firefox and dismissing the to prompts i cant click in firefox unless i press escape. I get this in the two versions. Sorry for posting to fast.
Version: 1.7 Branch → Trunk
I have to ad that even if press escape sometimes it does not solve the problem and I am forced to close.
Assignee: firefox → events
Status: UNCONFIRMED → NEW
Ever confirmed: true
QA Contact: general → ian
Whiteboard: DUPEME
Bug still exists in v. 1.5.0.1; slightly different behavior. Now I have to click "Ok" or hit escape *twice* to dismiss dialogue, then go to a different window and back.
But still exists in v. 3.0.6 - exactly as reported by Ben Drasin in 2006.
Assignee: events → nobody
QA Contact: ian → events
Component: Event Handling → User events and focus handling

Marking this as Resolved > Worksforme since the issue no longer is reproducible on the latest versions of Firefox Nightly 95.0a1 (2021-10-19), beta 94.0b7 or release 93.0 on Windows 10. The message is dismissable by pressing OK or the escape button or Enter on any simple interaction.
If anyone can still reproduce the issue either re-open it or file a new one.

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

Attachment

General

Creator:
Created:
Updated:
Size: