Skip to content

Commit 94a777d

Browse files
committed
Remove left-over autofocus code
Part of the removal of autofocus search box in PR #370
1 parent 9e1b8dc commit 94a777d

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

html/js/main.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,4 @@ function setup_search_box() {
1414
else {
1515
sel.removeClass('two-row');
1616
}
17-
18-
/* Focus search box on page load, but remove focus if the user appears
19-
to be trying to scroll the page with keyboard, rather than typing
20-
a search query
21-
*/
22-
$('#query').keydown( function(e){
23-
var el = $(this);
24-
if ( el.val().length && ( e.which == 32 || e.which == 40) ) {
25-
return true;
26-
}
27-
if ( e.which == 32 || e.which == 34 || e.which == 40 ) { el.blur() ; }
28-
// key codes: 32: space; 34: pagedown; 40: down arrow
29-
});
3017
}

0 commit comments

Comments
 (0)