<?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>3779</bug_id>
          
          <creation_ts>2005-06-30 14:09:14 -0700</creation_ts>
          <short_desc>gmail website steals tab focus</short_desc>
          <delta_ts>2006-05-31 14:55:04 -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>WebKit Misc.</component>
          <version>412</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris L. Mason">clmason</reporter>
          <assigned_to name="Dave Hyatt">hyatt</assigned_to>
          <cc>ap</cc>
    
    <cc>clmason</cc>
    
    <cc>jruderman</cc>
    
    <cc>mitz</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>13571</commentid>
    <comment_count>0</comment_count>
    <who name="Chris L. Mason">clmason</who>
    <bug_when>2005-06-30 14:09:14 -0700</bug_when>
    <thetext>If you start loading the gmail site in one tab, then (because if often takes awhile) you open a new tab 
and start doing something else, when the gmail site loads to the inbox, it switches the current tab in 
the user interface back to the tab gmail was loaded in!

What makes this more annoying is that often I am in a new tab, typing a new url, and the old tab with 
gmail pops back into &quot;focus&quot; just as I am hitting enter, resulting in the new site being loaded in the 
gmail tab, and me losing my gmail inbox!

I haven&apos;t encoutered any other site that manages to change the tab focus in Safari.  I&apos;m not sure how it 
is doing so, maybe some unique bit of javascript?  In any event, I think this behaviour should never be 
allowed.  I left gmail back in its own tab for a reason, I&apos;ll come back to it when I&apos;m good and ready!  :)

Note this also happens in Safari 1.3 and 1.2 and probably further back as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13609</commentid>
    <comment_count>1</comment_count>
    <who name="Joost de Valk (AlthA)">joost</who>
    <bug_when>2005-07-01 11:46:17 -0700</bug_when>
    <thetext>very, very weird bug... Should be fixed, before any other sites figure out how to do it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17018</commentid>
    <comment_count>2</comment_count>
    <who name="Chris L. Mason">clmason</who>
    <bug_when>2005-08-20 14:34:59 -0700</bug_when>
    <thetext>Blah, this bugzilla won&apos;t let me change my email address.  :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18690</commentid>
    <comment_count>3</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2005-09-04 13:14:33 -0700</bug_when>
    <thetext>If you call window.focus(), then your window and tab come to the front. That&apos;s working as designed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18714</commentid>
    <comment_count>4</comment_count>
    <who name="Chris L. Mason">clmason</who>
    <bug_when>2005-09-04 16:45:21 -0700</bug_when>
    <thetext>Because of the behaviour I described, I think this should not be permitted by
default.  If not, at least can an option be provided to turn this off (like with
the popup blocker)?  I believe that most people would not want windows and/or
tabs popping up of their own accord.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18742</commentid>
    <comment_count>5</comment_count>
    <who name="">mitz</who>
    <bug_when>2005-09-05 06:48:11 -0700</bug_when>
    <thetext>Firefox behaves differently. It never switches to the Gmail tab, but it does bring the window containing 
that tab to the front (which is rather pointless if it&apos;s not the active tab).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44095</commentid>
    <comment_count>6</comment_count>
    <who name="Jesse Ruderman">jruderman</who>
    <bug_when>2006-05-31 01:56:01 -0700</bug_when>
    <thetext>Hyatt agrees this is a bug.  It&apos;s similar to the fixed Gecko bug https://bugzilla.mozilla.org/show_bug.cgi?id=300453.

(Side note: WebKit gets this right for textboxes, while Gecko doesn&apos;t; see https://bugzilla.mozilla.org/show_bug.cgi?id=307933.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44096</commentid>
    <comment_count>7</comment_count>
      <attachid>8617</attachid>
    <who name="Jesse Ruderman">jruderman</who>
    <bug_when>2006-05-31 01:56:58 -0700</bug_when>
    <thetext>Created attachment 8617
simple testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44097</commentid>
    <comment_count>8</comment_count>
    <who name="Jesse Ruderman">jruderman</who>
    <bug_when>2006-05-31 02:00:15 -0700</bug_when>
    <thetext>Err... that testcase demonstrates the bug when loaded from file:///, but it hits a same-origin security error when loaded from Bugzilla.  I guess WebKit doesn&apos;t treat data: URLs the same way as Gecko.  Odd that it works from file:/// then.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44098</commentid>
    <comment_count>9</comment_count>
    <who name="Jesse Ruderman">jruderman</who>
    <bug_when>2006-05-31 02:03:04 -0700</bug_when>
    <thetext>There&apos;s also the question of whether web sites should be allowed to steal focus at all, but since that&apos;s not what Gmail is trying to do, I don&apos;t think that&apos;s on-topic for this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44168</commentid>
    <comment_count>10</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2006-05-31 14:31:45 -0700</bug_when>
    <thetext>Fixed.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44179</commentid>
    <comment_count>11</comment_count>
    <who name="Chris L. Mason">clmason</who>
    <bug_when>2006-05-31 14:55:04 -0700</bug_when>
    <thetext>
Thanks!
</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>8617</attachid>
            <date>2006-05-31 01:56:58 -0700</date>
            <delta_ts>2006-05-31 01:56:58 -0700</delta_ts>
            <desc>simple testcase</desc>
            <filename>focusiframe.html</filename>
            <type>text/html</type>
            <size>625</size>
            <attacher name="Jesse Ruderman">jruderman</attacher>
            
              <data encoding="base64">PGh0bWw+CjxoZWFkPgo8c2NyaXB0PgpmdW5jdGlvbiBmb2N1c0lmcmFtZSgpCnsKICB2YXIgaSA9
IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJpIik7CiAgaS5jb250ZW50V2luZG93LmZvY3VzKCk7
Cn0KPC9zY3JpcHQ+Cgo8Ym9keSBvbmxvYWQ9InNldFRpbWVvdXQoZm9jdXNJZnJhbWUsIDMwMDAp
OyI+Cgo8aWZyYW1lIGlkPSJpIiBzcmM9ImRhdGE6dGV4dC9odG1sLDxwPmlmcmFtZTxwPmlmcmFt
ZTxwPmlmcmFtZTxwPmlmcmFtZTxwPmlmcmFtZTxwPmlmcmFtZTxwPmlmcmFtZTxwPmlmcmFtZSI+
PC9pZnJhbWU+Cgo8cD5BZnRlciAzIHNlY29uZHMsIHRoaXMgcGFnZSBmb2N1c2VzIHRoZSBpZnJh
bWUuICBUaGlzIHNob3VsZCBtYWtlIHRoZSBpZnJhbWUgc2Nyb2xsYWJsZSB3aXRoIHRoZSBrZXli
b2FyZC4gIFRoaXMgc2hvdWxkIG5vdCBtYWtlIHRoaXMgcGFnZSdzIHRhYiBiZWNvbWUgdGhlIGZv
cmVncm91bmQgdGFiLjwvcD4KCjxwPnBhZ2U8cD5wYWdlPHA+cGFnZTxwPnBhZ2U8cD5wYWdlPHA+
cGFnZTxwPnBhZ2U8cD5wYWdlPHA+cGFnZTxwPnBhZ2U8cD5wYWdlPHA+cGFnZTxwPnBhZ2U8cD5w
YWdlPHA+cGFnZTxwPnBhZ2U8cD5wYWdlPHA+cGFnZTxwPnBhZ2UKCjwvYm9keT4KPC9odG1sPg==
</data>

          </attachment>
      

    </bug>

</bugzilla>