-
Notifications
You must be signed in to change notification settings - Fork 158
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
Pressing Enter when "Time Based One-Time Password" is set up causes it to reset #341
Comments
For a bit of added context, the additional code causing that modal is coming from https://github.com/Automattic/vip-go-mu-plugins/blob/master/two-factor.php#L223 (it shouldn't /cause/ the issue, just some extra context for reproducability) |
Would we have the same usability without the issue if it was a |
@georgestephanis There shouldn't be an issue with switching to
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/button |
It's always hard to do one form inside another. laugh |
We could use a checkbox or something and rely on to remove/reset config rather then submit button value. I've found a workaround to add fix: https://gist.github.com/rahulsprajapati/c08182f1fc88596bb3c2206e0eea4a60 If this make sense we could add it in plugin itself. |
Thanks @rahulsprajapati. How is this solution in terms of accessibility? |
It can be best demonstrated with this GIF...
Basically, set up your 2FA preference as "Time Based One-Time Password". Then go to any other profile field, update it and then press Enter (i.e. don't use the "Update Profile" button). You'll find that the 2FA setting have no deactivated.
I believe this is because pressing Enter is causing the "Reset Key" button to trigger instead of "Update Profile", due to it being the first form input.
The text was updated successfully, but these errors were encountered: