Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tab key being ignored in Firefox & IE #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/MaskedInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ export default {
const isIE = /*@cc_on!@*/false || !!document.documentMode; //by http://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser
/* eslint-enable */
const isFirefox = typeof InstallTrigger !== 'undefined';
if (isIE || isFirefox) {
// TODO: Check against a list of modifier keys instead of only the tab key with [].includes()
if ((isIE || isFirefox) && e.keyCode !== 9) {
e.preventDefault();
e.data = e.key;
this.textInput(e);
Expand Down