<?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>5394</bug_id>
          
          <creation_ts>2005-10-15 22:46:13 -0700</creation_ts>
          <short_desc>body onBlur=&quot;window.focus()&quot; breaks window focus</short_desc>
          <delta_ts>2022-09-01 11:48:53 -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>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andre-John Mas">andrejohn.mas</reporter>
          <assigned_to name="Maciej Stachowiak">mjs</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>ian</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>22119</commentid>
    <comment_count>0</comment_count>
    <who name="Andre-John Mas">andrejohn.mas</who>
    <bug_when>2005-10-15 22:46:13 -0700</bug_when>
    <thetext>If I defined a body tag as follows:

  &lt;body onBlur=&quot;window.focus()&quot;&gt;

then in Firefox and Opera the window will stay in front whenever I attempt to
click on another web browser Window. This is not the case in Safari. In Safari
the window will stay in front when I first click in another browser window, but
subsequent clicks fail to keep the window in front, yet the window which is now
in front does not allow user interaction.

I believe this is WebKit related.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22120</commentid>
    <comment_count>1</comment_count>
      <attachid>4368</attachid>
    <who name="Daniel Udey">dan</who>
    <bug_when>2005-10-16 00:43:11 -0700</bug_when>
    <thetext>Created attachment 4368
Test case HTML file

This is a very simple HTML file that reproduces this bug. To use, open two
windows in Safari or Shiira (or possibly other Webkit browsers). Move the two
windows so that both can be seen but overlap, then drag this file onto the top
window. It should display &quot;Test&quot;. Once it loads, click on the background
window. It should jump to the front momentarily, and then the other window will
come to the foreground again.

Clicking on the background window will bring it to the front, and if a site
with input controls is in the background window, you will be able to click on
them (they will gain the blue outline of an active control), but any typing you
do will be sent to the &apos;Test&apos; window regardless.

Cmd-~ will not work to switch between windows either, and in order to restore
proper behaviour, the &apos;Test&apos; window must be closed (Cmd-W accomplishes this,
since the &apos;Test&apos; window always has focus).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43137</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2006-05-22 05:36:59 -0700</bug_when>
    <thetext>WinIE behavior looks random - sometimes, the window manages to regain the focus, other times, it cannot, and just starts flashing in the taskbar.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1895499</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-09-01 09:15:46 -0700</bug_when>
    <thetext>ap@webkit.org - Can you guide me on how to test this? Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1895563</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2022-09-01 11:48:53 -0700</bug_when>
    <thetext>The behavior appears to be identical in all browsers now, which is that a window cannot bring itself to front with focus().

This behavior isn&apos;t what was requested here, but it&apos;s uniform across all browsers and user friendly - webpages shouldn&apos;t be able to prevent switching to other webpages.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>4368</attachid>
            <date>2005-10-16 00:43:11 -0700</date>
            <delta_ts>2005-10-16 00:43:11 -0700</delta_ts>
            <desc>Test case HTML file</desc>
            <filename>onblur.html</filename>
            <type>text/html</type>
            <size>168</size>
            <attacher name="Daniel Udey">dan</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEgVHJhbnNpdGlvbmFs
Ly9FTiI+Cgo8aHRtbD4KPGhlYWQ+Cgk8dGl0bGU+dGVzdDwvdGl0bGU+CjwvaGVhZD4KCjxib2R5
IG9uYmx1cj0id2luZG93LmZvY3VzKCkiPgo8cD5UZXN0PC9wPgo8L2JvZHk+Cgo8L2h0bWw+
</data>

          </attachment>
      

    </bug>

</bugzilla>