Skip to content

Commit

Permalink
Fix Bug 1134936 - Firefox download pages: filter localized builds as …
Browse files Browse the repository at this point in the history
…you type
  • Loading branch information
kyoshino committed Feb 20, 2015
1 parent f7864e4 commit c452ac0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions media/js/firefox/firefox-language-search.js
Expand Up @@ -13,7 +13,10 @@
var $input = $('#language-search-q');
var $tables = $('table.build-table');

$form.on('submit', function(e){
$form.on('submit', function(e) { filter(e); });
$input.on('input', function(e) { filter(e); });

function filter (e) {
e.preventDefault();
var search_q = $.trim($input.val()); // trim whitespace
if (!search_q) {
Expand Down Expand Up @@ -57,7 +60,7 @@
history.pushState({ query: search_q }, document.title,
'?q=' + encodeURI(search_q));
}
});
}

$(window).on('popstate', function (e) {
var state = e.originalEvent.state;
Expand Down

0 comments on commit c452ac0

Please sign in to comment.