summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2015-07-24 09:46:42 +0200
committerAndreas Gohr <andi@splitbrain.org>2015-07-24 09:46:42 +0200
commit1dd04f9774f268918c142128043ff8696ea41b42 (patch)
treedd19740bbc4eb33692a7cd2d5501c2efabf84913
parentb28801bc7f36b024f1051c1e7afd9be8a4c5171e (diff)
downloadrpg-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.
-rw-r--r--lib/plugins/styling/script.js7
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
}