window.onblur not triggered when other program or desktop is focused

NEW
Unassigned

Status

--
critical
12 years ago
9 years ago

People

(Reporter: koen.vossen, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6

The window.onblur event is not triggered when Mozilla put out of focus, for example when clicking on another application or on the desktop. It only seems to happen in OS X, Windows and Linux work fine.

Additionally: window.onblur does trigger when you switch tabs, but then is called three times in a row!

Reproducible: Always

Steps to Reproduce:
1. Create the following document:

<html>
<body>
<script language="javascript">
function test(){
	alert('test')
}
window.onblur = test;
</script>
</body>
</html>

2. Load this document in your browser.
3. Click the desktop.

Actual Results:  
Nothing happens.

Expected Results:  
A 'test' message box should appear.

Comment 1

12 years ago
Created attachment 242238 [details]
html page that demonstrates the bug

I can confirm that this also happens in 2.0 RC2. I have attached a testcase.

Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1) Gecko/20061003 Firefox/2.0

Updated

12 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 2

12 years ago
Im changing this to critical because I have gotten FF to crash on me 3 or 4 times by using the test attachment.  Its not consistent, but the crash happens when I close the test window, which occasionally triggers a blur for the now closed window. The popup alert sheet is not attached to any window.  Dismissing it causes a crash.

Also, If you blur the page by clicking on its url or search fields, you actually trigger the event twice.  Not sure if that is a related bug. I'll try to attach a screenshot of the floating alert.
Severity: normal → critical

Comment 3

12 years ago
Created attachment 242282 [details]
showing the alert not attached to any window.

Dismissing the alert causes a crash.

Comment 4

12 years ago
Created attachment 242283 [details]
crashlog

crashlog from the resulting crash

Comment 5

10 years ago
Window.OnBlur also does not trigger when using mac shortcut keyboard (e.g. F12)
F12 on mac operates the Dashboard widgets
Assignee: nobody → joshmoz
Component: Shell Integration → Widget: Mac
Product: Firefox → Core
QA Contact: shell.integration → mac

Updated

10 years ago
Assignee: joshmoz → nobody

Updated

9 years ago
Component: Widget: Mac → Widget: Mac
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.