diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-12-05 15:07:05 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-12-05 15:07:05 +0000 |
commit | f74ade943c6311cbb02da92c501f1b8995a0b1de (patch) | |
tree | 2f979f2e76cd26ec921a8810b0d319bca4687f65 /modules/overlay | |
parent | 84c25c37e70dd37d6cdfd8f3db63175f584294d6 (diff) | |
download | brdo-f74ade943c6311cbb02da92c501f1b8995a0b1de.tar.gz brdo-f74ade943c6311cbb02da92c501f1b8995a0b1de.tar.bz2 |
#649692 by Gábor Hojtsy: Fixed Overlay in WebKit browsers.
Diffstat (limited to 'modules/overlay')
-rw-r--r-- | modules/overlay/overlay-parent.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/overlay/overlay-parent.js b/modules/overlay/overlay-parent.js index df0f2f4ea..4cb3e5a1f 100644 --- a/modules/overlay/overlay-parent.js +++ b/modules/overlay/overlay-parent.js @@ -371,8 +371,12 @@ Drupal.overlay.bindChild = function (iFrameWindow, isClosing) { // Make the link overlay-friendly. var $link = $('a', addToShortcuts); $link.attr('href', Drupal.overlay.fragmentizeLink($link.get(0))); - // Move the button markup to the title section. - $('.overlay .ui-dialog-title').after(addToShortcuts); + // Move the button markup to the title section. We need to copy markup + // instead of moving the DOM element, because Webkit browsers will not + // move DOM elements between two DOM documents. + var shortcutsMarkup = '<div class="' + $(addToShortcuts).attr('class') + '">' + $(addToShortcuts).html() + '</div>'; + $('.overlay .ui-dialog-title').after(shortcutsMarkup); + $('.add-or-remove-shortcuts', $iFrameDocument).remove(); } // Remove any existing tabs. |