<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>18675</bug_id>
          
          <creation_ts>2008-04-21 23:53:17 -0700</creation_ts>
          <short_desc>blur/focus events aren&apos;t fired when the focus moves between tabs in the same window</short_desc>
          <delta_ts>2024-06-11 18:51:27 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>525.x (Safari 3.1)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kenn Ejima">kenn.ejima</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>blue</cc>
    
    <cc>cedricv</cc>
    
    <cc>jaymcc142</cc>
    
    <cc>lbrt21</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>78511</commentid>
    <comment_count>0</comment_count>
    <who name="Kenn Ejima">kenn.ejima</who>
    <bug_when>2008-04-21 23:53:17 -0700</bug_when>
    <thetext>Here&apos;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&apos;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.

&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;test&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
function onBodyFocus() {
  document.title = &apos;onBodyFocus&apos;;
}

function onBodyBlur() {
  document.title = &apos;onBodyBlur&apos;;
}
&lt;/script&gt;
  &lt;/head&gt;
  &lt;body onBlur=&quot;onBodyBlur()&quot; onFocus=&quot;onBodyFocus()&quot;&gt;
  &lt;/body&gt;
&lt;/html&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102077</commentid>
    <comment_count>1</comment_count>
    <who name="lobert">lbrt21</who>
    <bug_when>2008-12-09 23:23:50 -0800</bug_when>
    <thetext>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.

&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;test&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot;&gt;

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

function onBodyFocus() {
  document.title = &apos;onBodyFocus&apos;;
}

function onBodyBlur() {
  document.title = &apos;onBodyBlur&apos;;
}
&lt;/script&gt;
  &lt;/head&gt;
    &lt;body&gt;
  &lt;/body&gt;
&lt;/html&gt;

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102078</commentid>
    <comment_count>2</comment_count>
    <who name="lobert">lbrt21</who>
    <bug_when>2008-12-09 23:25:08 -0800</bug_when>
    <thetext>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.

&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;test&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot;&gt;

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

function onBodyFocus() {
  document.title = &apos;onBodyFocus&apos;;
}

function onBodyBlur() {
  document.title = &apos;onBodyBlur&apos;;
}
&lt;/script&gt;
  &lt;/head&gt;
    &lt;body&gt;
  &lt;/body&gt;
&lt;/html&gt;

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102082</commentid>
    <comment_count>3</comment_count>
    <who name="Kenn Ejima">kenn.ejima</who>
    <bug_when>2008-12-10 00:06:52 -0800</bug_when>
    <thetext>The status of this ticket has been unconfirmed for 7 months. Is there any way to change the status to new / assigned?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111420</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-02-27 01:39:44 -0800</bug_when>
    <thetext>*** Bug 24219 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111421</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-02-27 01:42:59 -0800</bug_when>
    <thetext>&lt;rdar://problem/6629580&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>