- 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.
This commit is contained in:
Nathan Gray 2009-01-05 18:09:14 +00:00
parent e7f82e886c
commit 9b1132c631

View File

@ -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]';