diff --git a/UI/Navbar/Search.js b/UI/Navbar/Search.js index 3391f9320..4e0e3b7d5 100644 --- a/UI/Navbar/Search.js +++ b/UI/Navbar/Search.js @@ -4,6 +4,17 @@ define( 'app', 'Series/SeriesCollection' ], function (App, SeriesCollection) { + $(document).on('keydown', function (e){ + if ($(e.target).is('input')) { + return; + } + + if (e.keyCode === 84) { + $('.x-series-search').focus(); + e.preventDefault(); + } + }); + $.fn.bindSearch = function () { $(this).typeahead({ source : function () { diff --git a/UI/app.js b/UI/app.js index d726c0830..8f64f4790 100644 --- a/UI/app.js +++ b/UI/app.js @@ -230,16 +230,5 @@ define( 'jQuery/TooltipBinder' ]); - $(document).on('keydown', function (e){ - if ($(e.target).is('input')) { - return; - } - - if (e.keyCode === 84) { - $('.x-series-search').focus(); - e.preventDefault(); - } - }); - return app; });