Skip to content

Commit

Permalink
Escape key management fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Twikito committed Jun 27, 2018
1 parent dec2335 commit 6f1ca2b
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 19 deletions.
5 changes: 1 addition & 4 deletions dist/easy-toggle-state.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,9 @@
const triggerEscElements = $$(ESCAPE);
if (triggerEscElements.length > 0) {
document.addEventListener("keyup", event => {
event = event || window.event;

if (!event.key === "Escape" && !event.key === "Esc") {
if (!(event.key === "Escape") && !(event.key === "Esc")) {
return;
}

triggerEscElements.forEach(trigger => {
if (!trigger.isToggleActive) {
return;
Expand Down
2 changes: 1 addition & 1 deletion dist/easy-toggle-state.es6.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions dist/easy-toggle-state.ie.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,12 +475,9 @@
var triggerEscElements = $$(ESCAPE);
if (triggerEscElements.length > 0) {
document.addEventListener("keyup", function (event) {
event = event || window.event;

if (!event.key === "Escape" && !event.key === "Esc") {
if (!(event.key === "Escape") && !(event.key === "Esc")) {
return;
}

triggerEscElements.forEach(function (trigger) {
if (!trigger.isToggleActive) {
return;
Expand Down
2 changes: 1 addition & 1 deletion dist/easy-toggle-state.ie.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6f1ca2b

Please sign in to comment.