[webkit-dev] Changes to window.focus/window.blur controlled by a setting?
Jochen Eisinger
jochen at chromium.org
Mon May 21 12:21:18 PDT 2012
On Mon, May 21, 2012 at 9:16 PM, Andrew Wilson <atwilson at google.com> wrote:
>
>
> On Mon, May 21, 2012 at 2:17 AM, Jochen Eisinger <jochen at chromium.org>wrote:
>
>> Hey,
>>
>> in https://bugs.webkit.org/show_bug.cgi?id=86969 I'm changing
>> window.focus and window.blur to match Firefox's behavior: window.blur does
>> nothing, and window.focus only works when invoked from the window that
>> actually opened the former.
>>
>> The goal is to thwart so-called pop unders.
>>
>
> The new behavior you describe will break notifications, since many pages
> will want to bring themselves to the front when someone clicks on their
> notification, and your patch prevents this. I suspect that the Firefox
> behavior will need to change when they add support for notifications.
>
> I still think that a superior change would be to prevent applications from
> calling window.focus() or window.blur() in the context of a user gesture
> once they've opened a new window. This would address popunders, while still
> allowing notifications to work.
>
The web page could just use setTimeout your restriction to work around
this, no?
-jochen
>
>>
>> Does any port want to have this new behavior configurable by e.g. a
>> setting?
>>
>> Feel free to directly comment on the bug.
>>
>> best
>> -jochen
>>
>> _______________________________________________
>> webkit-dev mailing list
>> webkit-dev at lists.webkit.org
>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120521/70e4b442/attachment.html>
More information about the webkit-dev
mailing list