diff options
author | Joakim Reinert <mail@jreinert.com> | 2015-04-19 00:41:13 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2015-05-05 12:21:27 +0200 |
commit | 7a6ddaf571efa3e87d6f40a4e465d31d16583979 (patch) | |
tree | 43ec0271ce429231f0c487617a531fe753f77175 /data/js/lexer-input.js | |
parent | 645ac23ebea2ff1fe6f585a4f8fea27c3928be0e (diff) |
Use util function for focusing dropdown menu input
Diffstat (limited to 'data/js/lexer-input.js')
-rw-r--r-- | data/js/lexer-input.js | 9 |
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 = { |