From 4658b1837e0c6d006da263dce1869448acaa8c3c Mon Sep 17 00:00:00 2001 From: dongsheng Date: Thu, 30 Oct 2008 02:11:43 +0000 Subject: [PATCH] "MDL-13766, the keylistener should be created dependently of the input element" --- repository/javascript.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/repository/javascript.php b/repository/javascript.php index 9e0569397e..33ee3ed657 100644 --- a/repository/javascript.php +++ b/repository/javascript.php @@ -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++) { -- 2.39.5