From 42d2e0ebbf293c0d300673affed7924d8eea5dc3 Mon Sep 17 00:00:00 2001 From: Ed Linklater Date: Sun, 1 Nov 2015 05:56:39 +1300 Subject: [PATCH] Don't try to unbind events from inside top-level iframes --- admin/javascript/LeftAndMain.ActionTabSet.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/javascript/LeftAndMain.ActionTabSet.js b/admin/javascript/LeftAndMain.ActionTabSet.js index 0806be353..dbbf3da22 100644 --- a/admin/javascript/LeftAndMain.ActionTabSet.js +++ b/admin/javascript/LeftAndMain.ActionTabSet.js @@ -28,7 +28,7 @@ // Remove all bound events. // This guards against an edge case where the click handlers are not unbound // because the panel is still open when the ajax edit form reloads. - var frame = $('.cms').find('iframe'); + var frame = $('.cms-container').find('iframe'); frame.each(function(index, iframe){ $(iframe).contents().off('click.ss-ui-action-tabset'); }); @@ -58,7 +58,7 @@ * Note: Should be called by a click event attached to 'this' */ attachCloseHandler: function(event, ui) { - var that = this, frame = $('.cms').find('iframe'), closeHandler; + var that = this, frame = $('.cms-container').find('iframe'), closeHandler; // Create a handler for the click event so we can close tabs // and easily remove the event once done @@ -74,7 +74,7 @@ that.tabs('option', 'active', false); // close tabs // remove click event from objects it is bound to (iframe's and document) - frame = $('.cms').find('iframe'); + frame = $('.cms-container').find('iframe'); frame.each(function(index, iframe){ $(iframe).contents().off('click.ss-ui-action-tabset', closeHandler); });