Skip to content

Commit

Permalink
Merge pull request #120 from max107/fix_global_events
Browse files Browse the repository at this point in the history
Fix ff bug with global event:
  • Loading branch information
diafour committed Dec 27, 2018
2 parents 03934fb + 8a9e6f1 commit 21cca70
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions public/assets/javascripts/search-params.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@ SearchParams.prototype.initEvents = function() {
search_params.closeAll();
}
});
$(document).on('click', function() {
event.stopPropagation();
$(document).on('click', function(e) {
e.stopPropagation();
});
$.each(this.params, function(key, param) {
param.btn.on('click', function() {
event.stopPropagation();
param.btn.on('click', function(e) {
e.stopPropagation();
if (param.is_open) {
param.close();
} else {
search_params.closeAll();
param.open();
}
});
param.popover.on('click', function() {
event.stopPropagation();
param.popover.on('click', function(e) {
e.stopPropagation();
});
});
}
Expand Down

0 comments on commit 21cca70

Please sign in to comment.