From f74ade943c6311cbb02da92c501f1b8995a0b1de Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sat, 5 Dec 2009 15:07:05 +0000 Subject: =?UTF-8?q?#649692=20by=20G=C3=A1bor=20Hojtsy:=20Fixed=20Overlay?= =?UTF-8?q?=20in=20WebKit=20browsers.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/overlay/overlay-parent.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'modules') 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 = '
' + $(addToShortcuts).html() + '
'; + $('.overlay .ui-dialog-title').after(shortcutsMarkup); + $('.add-or-remove-shortcuts', $iFrameDocument).remove(); } // Remove any existing tabs. -- cgit v1.2.3