Page MenuHomePhabricator

Add a numeric input control for TOTP codes
ClosedPublic

Authored by epriestley on Jul 23 2016, 8:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 27, 11:22 AM
Unknown Object (File)
Tue, May 6, 4:37 PM
Unknown Object (File)
Wed, Apr 30, 2:00 PM
Unknown Object (File)
Apr 28 2025, 6:46 PM
Unknown Object (File)
Apr 27 2025, 7:48 AM
Unknown Object (File)
Apr 25 2025, 7:02 PM
Unknown Object (File)
Apr 13 2025, 1:17 PM
Unknown Object (File)
Mar 25 2025, 5:47 AM
Subscribers
None

Details

Summary

Fixes T11365. I tested these variants:

  • <input type="number" />
  • <input type="text" pattern="\d*" />

Of these, this one (using pattern) appears to have the best behavior: it shows the correct keyboard on iOS mobile and does nothing on desktops.

Using type="number" causes unwanted sub-controls to appear in desktop Safari, and a numbers + symbols keyboard to appear on iOS (presumably so users can type "." and "-" and maybe ",").

Test Plan

Tested variants in desktop browsers and iOS simulator, see here and T11365 for discussion.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Add a numeric input control for TOTP codes.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Jul 23 2016, 10:37 PM
This revision was automatically updated to reflect the committed changes.