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
F13059977: D16323.diff
Fri, Apr 19, 5:06 PM
Unknown Object (File)
Thu, Apr 11, 10:08 AM
Unknown Object (File)
Wed, Apr 10, 4:33 PM
Unknown Object (File)
Sun, Apr 7, 12:42 PM
Unknown Object (File)
Sat, Apr 6, 8:15 AM
Unknown Object (File)
Sat, Mar 30, 10:53 AM
Unknown Object (File)
Mar 18 2024, 7:24 PM
Unknown Object (File)
Feb 19 2024, 3:39 PM
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.