开发者

How to get the Blur event to fire for the document on the iPhone?

开发者 https://www.devze.com 2022-12-25 08:00 出处:网络
Does anyone know how to get the blur event to fire on the document for the iPhone? I\'m trying to get it to fire either when a user changes windows in Safari, or 开发者_JS百科when they open their boo

Does anyone know how to get the blur event to fire on the document for the iPhone?

I'm trying to get it to fire either when a user changes windows in Safari, or 开发者_JS百科when they open their bookmarks or when they decide to add the page to their homescreen. But none of these are firing it.

Here's my code:

    $(document).blur( function () {                 
        document.title = "Ian Taylor";
    });

I've tried "document", "window", "'body'". Nothing seems to work.


According to quirksmode, Safari on the iPhone does not fire the "blur" event when the window loses focus.

http://www.quirksmode.org/dom/events/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号