Skip to content
This repository has been archived by the owner on Jan 28, 2020. It is now read-only.

Commit

Permalink
Merge pull request toggl#1158 from reneroth/fix/prevent-input-event-b…
Browse files Browse the repository at this point in the history
…ubbling

Prevent keydown event bubbling when inside toggl popup
  • Loading branch information
tcrammond authored Dec 11, 2018
2 parents 34199ab + fb56693 commit 0b308ab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/scripts/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,11 @@ window.togglbutton = {
return false;
});

/* prevent certain host webapps from processing key commands */
$('form', editForm).addEventListener('keydown', function(e) {
e.stopPropagation();
});

togglbutton.$billable.addEventListener('click', function() {
this.classList.toggle('tb-checked');
});
Expand Down

0 comments on commit 0b308ab

Please sign in to comment.