diff options
author | Andreas Gohr <andi@splitbrain.org> | 2015-07-24 09:46:42 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2015-07-24 09:46:42 +0200 |
commit | 1dd04f9774f268918c142128043ff8696ea41b42 (patch) | |
tree | dd19740bbc4eb33692a7cd2d5501c2efabf84913 /lib | |
parent | b28801bc7f36b024f1051c1e7afd9be8a4c5171e (diff) | |
download | rpg-1dd04f9774f268918c142128043ff8696ea41b42.tar.gz rpg-1dd04f9774f268918c142128043ff8696ea41b42.tar.bz2 |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/plugins/styling/script.js | 7 |
1 files changed, 4 insertions, 3 deletions
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('<div id="plugin__styling_loader">' + LANG.plugins.styling.loader + '</div>'); + $loader = target.jQuery('<div id="plugin__styling_loader">' + LANG.plugins.styling.loader + '</div>'); $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('<p></p>'); return; // we exit here if this is not the popup } |