Bug 115906 - Disallow a window to focus itself via javascript URLs or using target _self
Summary: Disallow a window to focus itself via javascript URLs or using target _self
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: jochen
URL:
Keywords:
: 115706 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-05-10 06:55 PDT by jochen
Modified: 2017-07-27 04:56 PDT (History)
7 users (show)

See Also:


Attachments
Patch (5.37 KB, patch)
2013-05-10 06:57 PDT, jochen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jochen 2013-05-10 06:55:48 PDT
Disallow a window to focus itself via javascript URLs or using target _self
Comment 1 jochen 2013-05-10 06:57:09 PDT
Created attachment 201342 [details]
Patch
Comment 2 Geoffrey Garen 2013-05-10 14:08:51 PDT
What's the rationale for this change? Is this some sort of popup blocking, or something else?
Comment 3 jochen 2013-05-11 03:24:53 PDT
In http://trac.webkit.org/changeset/118916, I added a restriction to window.focus() that disallows a window to focus itself. Apparently, some popunder scripts are using this workaround to get around the window.focus() restriction.
Comment 4 Geoffrey Garen 2013-05-11 10:22:06 PDT
Comment on attachment 201342 [details]
Patch

r=me
Comment 5 WebKit Commit Bot 2013-05-11 12:08:21 PDT
Comment on attachment 201342 [details]
Patch

Clearing flags on attachment: 201342

Committed r149936: <http://trac.webkit.org/changeset/149936>
Comment 6 WebKit Commit Bot 2013-05-11 12:08:23 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Anne van Kesteren 2017-07-27 04:56:42 PDT
*** Bug 115706 has been marked as a duplicate of this bug. ***