From 9b1132c6311cb056d8e71ea88353d6b8271dc99b Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 5 Jan 2009 18:09:14 +0000 Subject: [PATCH] - Fix bug that allowed tab key to trigger the search, which made tabbing through a list very annoying. - Allow up / down arrow keys to trigger a blank search. Due to the above bug, many users were doing this anyway. --- etemplate/js/ajax_select.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/etemplate/js/ajax_select.js b/etemplate/js/ajax_select.js index 7d41ca1e11..3d8cbab40b 100644 --- a/etemplate/js/ajax_select.js +++ b/etemplate/js/ajax_select.js @@ -233,13 +233,9 @@ function change(e, value) { var base_id = id.substr(0, id.lastIndexOf('[')); if(document.getElementById(base_id + '[results]')) { set_id = base_id + '[results]'; - if(document.getElementById(set_id).style.display == 'block') { - // Tab and arrow keys don't trigger the search - if(e.keyCode == 9 - || e.keyCode == 38 || e.keyCode == 40 - || e.keyCode == 63232 || e.keyCode == 63233) { - return; - } + // Tab doesn't trigger the search + if(e.keyCode == 9 ) { + return; } } else { set_id = base_id + '[search]';