From 6fe31542f67b31d6f7c93c6055c7ba0ca86b5fc3 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sat, 30 Jan 2010 06:45:26 +0000 Subject: #673810 by casey and mrfelton: Make overlay respect key handlers. --- modules/overlay/overlay-parent.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/overlay/overlay-parent.js b/modules/overlay/overlay-parent.js index f4d92cd42..ff346a76d 100644 --- a/modules/overlay/overlay-parent.js +++ b/modules/overlay/overlay-parent.js @@ -406,6 +406,12 @@ Drupal.overlay.bindChild = function (iframeWindow, isClosing) { $(document).unbind('mousedown.dialog-overlay click.dialog-overlay'); $('.ui-widget-overlay').bind('mousedown.dialog-overlay click.dialog-overlay', function (){return false;}); + // Unbind the keydown and keypress handlers installed by ui.dialog because + // they interfere with use of browser's keyboard hotkeys like CTRL+w. + // This may cause problems when using modules that implement keydown or + // keypress handlers as they aren't blocked when overlay is open. + $(document).unbind('keydown.dialog-overlay keypress.dialog-overlay'); + // Reset the scroll to the top of the window so that the overlay is visible again. window.scrollTo(0, 0); -- cgit v1.2.3