IE9 and self.close()

前端 未结 2 1562
清酒与你
清酒与你 2021-01-23 06:46

I have an iframed \"pop-up\" window in InnovaStudio WYSIWYG Editor (5.3). It is used to place a link from navigation into the text. Once a link is clicked, the pop-up should c

相关标签:
2条回答
  • 2021-01-23 07:07

    I used console.log(self.close) and traced it to these lines in InnovaStudio's istoolbar.js code:

    me.rt.frm.contentWindow.closeWin=function() {
        me.close();
    };
    me.rt.frm.contentWindow.close=function() {
        me.close();
    };
    

    So, thinking that IE9 may not be seeing the close() for some reason, I changed my code to use closeWin():

    $('#InternalLinkSelector').find('a').click(function(e) {
        e.preventDefault();
        $this = $(this);
        (opener ? opener : openerWin).oUtil.obj.insertLink($this.attr('href'), $this.html(), null, null);
        self.closeWin();
    });
    

    Now it works!

    0 讨论(0)
  • 2021-01-23 07:28

    Try window.close() instead of self.close()

    0 讨论(0)
提交回复
热议问题