]> git.mjollnir.org Git - moodle.git/commitdiff
"MDL-13766, the keylistener should be created dependently of the input element"
authordongsheng <dongsheng>
Thu, 30 Oct 2008 02:11:43 +0000 (02:11 +0000)
committerdongsheng <dongsheng>
Thu, 30 Oct 2008 02:11:43 +0000 (02:11 +0000)
repository/javascript.php

index 9e0569397e5e879086462ce1a57e4e81a7569710..33ee3ed6576ad653020e3ec3df4087174ad2ba15 100644 (file)
@@ -265,7 +265,8 @@ this.create_picker = function() {
             searchbtn.on('click', this.fnSearch, this.input_ctl);
         });
         input_ctl.on('contentReady', function() {
-            var k1 = new YAHOO.util.KeyListener(document, {keys:13}, {fn:function(){this.fnSearch()},scope:searchbtn, correctScope: true});
+            var scope = document.getElementById('search-input-$suffix');
+            var k1 = new YAHOO.util.KeyListener(scope, {keys:13}, {fn:function(){this.fnSearch()},scope:searchbtn, correctScope: true});
             k1.enable();
         });
         for(var i=0; i<_client.repos.length; i++) {