Bug 19375 - window.focus steals focus from other windows
Summary: window.focus steals focus from other windows
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Major
Assignee: Nobody
URL:
Keywords: GoogleBug, HasReduction, InRadar
Depends on:
Blocks:
 
Reported: 2008-06-03 08:57 PDT by Erik Arvidsson
Modified: 2013-09-30 11:30 PDT (History)
2 users (show)

See Also:


Attachments
Open this in a background tab (177 bytes, text/html)
2008-06-03 08:58 PDT, Erik Arvidsson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Arvidsson 2008-06-03 08:57:38 PDT
If I am happily working in one window or tab and another window or tab does a window.focus() WebKit immediately changes to that tab.

Steps to reproduce:

1. Open attached file in a new tab or window.
2. Go to another tab or window

Desired effect:

Should stay on the non attachment tab/window

Actual effect:

Switches to the attachment tab/window every 5 seconds.


This is very destructive since apps like gmail does this and gmail has weird keyboard shortcuts.  As I was writing this comment gmail stole my focus and triggered the 'r'  (reply) command.
Comment 1 Erik Arvidsson 2008-06-03 08:58:29 PDT
Created attachment 21478 [details]
Open this in a background tab
Comment 2 Erik Arvidsson 2008-06-03 10:39:38 PDT
I modified the test case a little to call focus() on a textarea in the timer but that does not trigger the focus stealing.
Comment 3 Mark Rowe (bdash) 2008-06-11 00:26:46 PDT
<rdar://problem/5999626>
Comment 4 James Craig 2013-09-30 11:30:33 PDT
Reassigning to Event Handling.