Split event listener and selector string

Event and selectors appear to have been accidentally combined. The result is that typing in any input triggers a call to the `/get_matching_tags` route. We can probably limit the selector farther to only fire when `#tags` is typed into.
This commit is contained in:
Jonathan Rehm 2017-07-10 13:03:58 -07:00
parent 74e93e1cdf
commit 802eb628c8

View File

@ -162,7 +162,7 @@ var promiseLanguages = languages.initialize();
});
});
$("form").on("change input typeahead:selected", function(data){
$("form").on("change", "input.typeahead:selected", function(){
var form = $("form").serialize();
$.getJSON( getPath()+"/get_matching_tags", form, function( data ) {
$(".tags_click").each(function() {