IE9 Window Loses Focus due to jQuery Mobile

前端 未结 4 2246
深忆病人
深忆病人 2021-02-19 20:20

In our product, we\'re using the most recent development version of jQuery Mobile in our ASP.NET website. Each and every time we do an ASP.NET postback, the browser window goes

4条回答
  •  名媛妹妹
    2021-02-19 20:44

    I had similar problem with IE10 and jQuery 1.7.2. I found these lines in my code:

    $(document.activeElement).blur();
    

    and

    $(':focus').blur();
    

    So, adding simple .not('body') resolves the problem:

    $(document.activeElement).not('body').blur();
    $(':focus').not('body').blur();
    

提交回复
热议问题