IE9 Window Loses Focus due to jQuery Mobile

前端 未结 4 2247
深忆病人
深忆病人 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:45

    This same issue seems to occur with jQuery Mobile 1.4.2.

    When using IE 10, with a single tab open and another window on the same monitor, if you open a popup it will send the browser to the background.

    To fix this you have to edit the _handleDocumentFocusIn function. You need to change the line(10391) that reads:

    target.blur();

    to

    if (targetElement.nodeName.toLowerCase() !== "body")
    {
        target.blur();
    }
    

    I made a pull request so hopefully this will be included in the next version.

提交回复
热议问题