Skip to content

Commit

Permalink
And make sure we set it back to false if it does not match
Browse files Browse the repository at this point in the history
  • Loading branch information
andymccray authored and makenosound committed Jul 12, 2021
1 parent b24a3d5 commit 3adf0af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/disable-input-zoom/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const phoneBreakpoint = window.matchMedia("(max-width: 639px)");
phoneBreakpoint.addEventListener("change", function (e) {
if (e.matches) {
allowDisable = true;
} else {
allowDisable = false;
}
});

Expand Down
2 changes: 2 additions & 0 deletions src/disable-input-zoom/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ const phoneBreakpoint = window.matchMedia("(max-width: 639px)")
phoneBreakpoint.addEventListener("change", (e) => {
if (e.matches) {
allowDisable = true
} else {
allowDisable = false
}
})

Expand Down

0 comments on commit 3adf0af

Please sign in to comment.