summaryrefslogtreecommitdiffstats
path: root/data/js
diff options
context:
space:
mode:
Diffstat (limited to 'data/js')
-rw-r--r--data/js/lexer-input.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/data/js/lexer-input.js b/data/js/lexer-input.js
index 62b59650d..a4d3c7058 100644
--- a/data/js/lexer-input.js
+++ b/data/js/lexer-input.js
@@ -31,12 +31,9 @@ define(['util', 'underscore', 'jquery-ui'], function (Util, _) {
this.switchLexer(lexer, baseUrl);
}, this));
- $('.lexer-toggle').on('click', function(event) {
- setTimeout(function() {
- var dropDown = $(event.target).siblings('.dropdown-menu');
- dropDown.find('input').focus();
- }, 0);
- });
+ $('.lexer-toggle').on('click', _.bind(function(event) {
+ Util.focusDropdownInput(event.target);
+ }, Util));
}
};
var LexerInput = {