252 Unstar Star 475 Fork 257

稻米 / LigerUIJavaScript

ligerTab中增加外域地址的Tab页,关闭该Tab页时,需要关闭两次

Closed
pfdoschina  Opened this issue

Release v1.2.3版本,ligerTab.js:
新增tab页时使用iframe方式。关闭tab页时先将src设置为about:blank,以释放内存,然后清除iframe中document元素。
如果该tab页为外域链接,关闭时将出现跨域异常,中断函数执行。造成关闭失败,需要再次关闭才可移除tab页。

异常位置:
http://git.oschina.net/ligerui/LigerUI/blob/Release/Source/lib/ligerUI/js/plugins/ligerTab.js#L773

修复方案:
try{
frame.contentWindow.document.write('');
}
catch(){}

另外ligerDialog.js中有同样问题:
http://git.oschina.net/ligerui/LigerUI/blob/Release/Source/lib/ligerUI/js/plugins/ligerDialog.js#L659

17593 ligerui 1578915163 total 2 participants

Comments (2)

17593 ligerui 1578915163
稻米 2014-09-02 18:15 owner

多谢多谢

17593 ligerui 1578915163
稻米 2014-09-02 18:15 owner

Status changed to closed

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Not set
Planed to end
Not set
Top level
Priority
JavaScript
1
https://gitee.com/ligerui/LigerUI.git
git@gitee.com:ligerui/LigerUI.git
ligerui
LigerUI
LigerUI

Search