summaryrefslogtreecommitdiffstats
path: root/data/js
diff options
context:
space:
mode:
authorJoakim Reinert <mail@jreinert.com>2015-04-19 00:41:13 +0200
committerFlorian Pritz <bluewind@xinu.at>2015-05-05 12:21:27 +0200
commit7a6ddaf571efa3e87d6f40a4e465d31d16583979 (patch)
tree43ec0271ce429231f0c487617a531fe753f77175 /data/js
parent645ac23ebea2ff1fe6f585a4f8fea27c3928be0e (diff)
Use util function for focusing dropdown menu input
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 = {