Bug 18675 - blur/focus events aren't fired when the focus moves between tabs in the same window
Summary: blur/focus events aren't fired when the focus moves between tabs in the same ...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 525.x (Safari 3.1)
Hardware: Mac OS X 10.5
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
: 24219 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-04-21 23:53 PDT by Kenn Ejima
Modified: 2010-03-02 21:19 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kenn Ejima 2008-04-21 23:53:17 PDT
Here's the screecast:
http://screencast.com/t/UtSsSCtdX

As you see, if you activate another window, onBlur event gets called, but if you activate another tab in the same window, onBlur event  isn't called.

Firefox works perfectly in that sense. You can confirm it in the screencast:
http://screencast.com/t/xTkKUZhI1Xn

The following HTML is the test code used here.

<html>
  <head>
    <title>test</title>
<script type="text/javascript">
function onBodyFocus() {
  document.title = 'onBodyFocus';
}

function onBodyBlur() {
  document.title = 'onBodyBlur';
}
</script>
  </head>
  <body onBlur="onBodyBlur()" onFocus="onBodyFocus()">
  </body>
</html>
Comment 1 lobert 2008-12-09 23:23:50 PST
Hi,

This bug is also present in Safari 3.2.1 with Mac OS X 10.5.5 when tabbing using trigger window.onblur

The following HTML is the test code used here.

<html>
  <head>
    <title>test</title>
<script type="text/javascript">

window.onblur = onBodyBlur;
window.onfocus = onBodyFocus;

function onBodyFocus() {
  document.title = 'onBodyFocus';
}

function onBodyBlur() {
  document.title = 'onBodyBlur';
}
</script>
  </head>
    <body>
  </body>
</html>

Comment 2 lobert 2008-12-09 23:25:08 PST
Hi,

This bug is also present in Safari 3.2.1 with Mac OS X 10.5.5 when tabbing using trigger window.onblur

The following HTML is the test code used here.

<html>
  <head>
    <title>test</title>
<script type="text/javascript">

window.onblur = onBodyBlur;
window.onfocus = onBodyFocus;

function onBodyFocus() {
  document.title = 'onBodyFocus';
}

function onBodyBlur() {
  document.title = 'onBodyBlur';
}
</script>
  </head>
    <body>
  </body>
</html>

Comment 3 Kenn Ejima 2008-12-10 00:06:52 PST
The status of this ticket has been unconfirmed for 7 months. Is there any way to change the status to new / assigned?
Comment 4 Alexey Proskuryakov 2009-02-27 01:39:44 PST
*** Bug 24219 has been marked as a duplicate of this bug. ***
Comment 5 Alexey Proskuryakov 2009-02-27 01:42:59 PST
<rdar://problem/6629580>