From 1dd04f9774f268918c142128043ff8696ea41b42 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 24 Jul 2015 09:46:42 +0200 Subject: fixed styling preview in IE IE doesn't like it when you create a DOM element in one window and try to insert it in another window. --- lib/plugins/styling/script.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/plugins/styling/script.js b/lib/plugins/styling/script.js index f2d550b21..2f4285269 100644 --- a/lib/plugins/styling/script.js +++ b/lib/plugins/styling/script.js @@ -5,7 +5,7 @@ jQuery(function () { /** * Function to reload the preview styles in the main window * - * @param {window} target the main window + * @param {Window} target the main window */ function applyPreview(target) { // remove style @@ -13,9 +13,9 @@ jQuery(function () { $style.attr('href', ''); // append the loader screen - $loader = target.jQuery('#plugin__styling_loader'); + var $loader = target.jQuery('#plugin__styling_loader'); if (!$loader.length) { - $loader = jQuery('
' + LANG.plugins.styling.loader + '
'); + $loader = target.jQuery('
' + LANG.plugins.styling.loader + '
'); $loader.css({ 'position': 'absolute', 'width': '100%', @@ -68,6 +68,7 @@ jQuery(function () { var windowFeatures = "menubar=no,location=no,resizable=yes,scrollbars=yes,status=false,width=500,height=500"; window.open(DOKU_BASE + 'lib/plugins/styling/popup.php', 'styling_popup', windowFeatures); e.preventDefault(); + e.stopPropagation(); }).wrap('

'); return; // we exit here if this is not the popup } -- cgit v1.2.3