IE jquery multi-tab IFRAME closed tab causes cursor loss

Source: Internet
Author: User

In the project, dwz is used as the JQ framework. Because the previously developed items are on the traditional webform, a large number of IFRAME is used and its openexternal function is used to implement multiple tabs.

Development is fine. in use, I found that under IE, if a tab page is opened again, and then submitted and the closecuritytab method is called, The cursor will survive and cannot be found, only the tab key can be used for retrieval.

Then I began to look at the vast Baidu, and found that there were very few people who used the same way as me. Ah, they could not keep up with the times.

Finally, I saw a person who used the same way as me. Unfortunately, dwz is not used, but it is actually a bug of IE.


The framework embedded IFRAME Click Event pop-up layer. The pop-up layer is nested with IFRAME. When the input in the pop-up layer IFRAME obtains the cursor, the pop-up layer is deleted (jquery is used. remove (),#. parentnode. removechild (#) cannot be tested.) the input of IFRAME embedded in the framework cannot be focused.

Delete the IFRAME and then the pop-up layer.


Therefore, we need to modify the _ closetab method of dwz. navtab. JS, and then IE will have no bugs.

_ Closetab: Function  (Index, opentabid ){  VaR Iopenindex = This . _ Indextabid (opentabid );  VaR $ Panel = This  . _ Getpanels (). eq (iopenindex); $ panel. Find ( "Iframe" ). Remove (); collectgarbage ();  This  . _ Gettabs (). eq (INDEX). Remove ();  This  . _ Getpanels (). eq (INDEX). Trigger (dwz. eventtype. pageclear). Remove ();  This  . _ Getmoreli (). eq (INDEX). Remove ();  If (This . _ Currentindex> = index) This . _ Currentindex -- ;  If  (Opentabid ){  VaR Openindex = This  . _ Indextabid (opentabid );  If (Openindex> 0) This . _ Currentindex = Openindex ;}  This  . _ Init (); This  . _ Scrollcurrent ();  This . _ Reload ( This . _ Gettabs (). eq ( This  . _ Currentindex ));}, 


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.