summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/overlay/overlay-parent.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/overlay/overlay-parent.js b/modules/overlay/overlay-parent.js
index a30b83e9a..b0df0890d 100644
--- a/modules/overlay/overlay-parent.js
+++ b/modules/overlay/overlay-parent.js
@@ -459,15 +459,16 @@ Drupal.overlay.bindChild = function (iframeWindow, isClosing) {
$tabs = $(self.$iframeWindow('<div>').append($tabs).remove().html());
self.$dialogTitlebar.append($tabs);
- if ($tabs.is('.primary')) {
- $tabs.find('a').removeClass('overlay-processed');
- Drupal.attachBehaviors($tabs);
- }
+
// Remove any classes from the list element to avoid theme styles
// clashing with our styling.
$tabs.removeAttr('class');
}
+ // Re-attach the behaviors we lost while copying elements from the iframe
+ // document to the parent document.
+ Drupal.attachBehaviors(self.$dialogTitlebar);
+
// Try to enhance keyboard based navigation of the overlay.
// Logic inspired by the open() method in ui.dialog.js, and
// http://wiki.codetalks.org/wiki/index.php/Docs/Keyboard_navigable_JS_widgets