MDL-33891 Ensure that listen events are cancelled correctly when closing the dialogue
authorAndrew Robert Nicols <andrew.nicols@luns.net.uk>
Wed, 20 Jun 2012 09:18:19 +0000 (10:18 +0100)
committerAndrew Robert Nicols <andrew.nicols@luns.net.uk>
Wed, 20 Jun 2012 09:18:19 +0000 (10:18 +0100)
lib/yui/chooserdialogue/chooserdialogue.js

index 1a499a8..e67af29 100644 (file)
@@ -249,8 +249,8 @@ YUI.add('moodle-core-chooserdialogue', function(Y) {
         },
 
         hide : function() {
-            // Detach the global keypress handler before hiding
-            Y.one('document').detach('keyup', this.handle_key_press, this);
+            // Cancel all listen events
+            this.cancel_listenevents();
 
             // Re-enable the page scrollbars
             if (Y.UA.ie > 0) {