Visitar URL original
USWDS - Input mask: Version 2 by amyleadem · Pull Request #5227 · uswds/uswds · GitHub
Skip to content
Open
Changes from 1 commit
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
f608f23
Commit package-lock
mitchmoccia Nov 5, 2022
2ef2112
Merge branch 'jb-inclusive-patterns-input-mask' of https://github.com…
mitchmoccia Nov 8, 2022
145a031
Commit package-lock
mitchmoccia Nov 8, 2022
9851cd0
Rewrite input mask to address several requested features
mitchmoccia Nov 8, 2022
dd52cea
Input mask rewrite in progress updates
mitchmoccia Nov 21, 2022
53282a3
Implement dynamic invalid masked character messaging and more refacto…
mitchmoccia Nov 22, 2022
0443a2e
Implement shell mask feature so when typing, mask characters are repl…
mitchmoccia Nov 27, 2022
b6ae0e3
Input mask rewrite in progress updates
mitchmoccia Nov 30, 2022
ba8cae5
Input mask rewrite in progress updates
mitchmoccia Dec 5, 2022
c647760
Input mask rewrite in progress updates
mitchmoccia Dec 5, 2022
a605edc
Address pasted data and arrow key navigation issues
mitchmoccia Dec 13, 2022
0905594
Fix mask issue where paste would allow letters in number mask and oth…
mitchmoccia Dec 14, 2022
5e34757
Refactor and clean up
mitchmoccia Dec 15, 2022
d557506
Update Input mask unit test
mitchmoccia Dec 26, 2022
b40dbaa
Finalize the rest of the unit tests for input mask
mitchmoccia Dec 26, 2022
445868c
Add keyup handler, prevent arrow key to left of leading format charac…
mitchmoccia Dec 29, 2022
bfa6061
Finalize unit tests for input mask
mitchmoccia Dec 29, 2022
93c4a4d
Allow select all quick key in field plus fix issue with field history…
mitchmoccia Jan 3, 2023
5be6aa2
Fix incorrect id on date short and clean up
mitchmoccia Jan 5, 2023
356057b
Fix style related issue with leading format characters, plus update u…
mitchmoccia Jan 9, 2023
d50217f
Merge in develop and resolve conflicts
mitchmoccia Jan 9, 2023
338f569
Update package-lock
mitchmoccia Jan 9, 2023
fae34ed
Fix CSS for input mask shell formatting
mitchmoccia Jan 9, 2023
1768dd0
Implement input mask unit tests that check for correct mask formatting
mitchmoccia Jan 17, 2023
1c78952
Clean up input mask unit tests and fix a hardcoded querySelector in t…
mitchmoccia Jan 18, 2023
636e177
Fix issue with input mask date unit test
mitchmoccia Jan 20, 2023
62ab762
Remove the pattern attribute from all input mask examples
mitchmoccia Jan 23, 2023
c83f582
Remove the pattern attribute from input unit tests
mitchmoccia Jan 23, 2023
5ea219a
Change US to U.S. for input mask examples plus one update for this in…
mitchmoccia Jan 23, 2023
42652ab
Set forceupper to true without the quotes
mitchmoccia Jan 24, 2023
627a371
Change hint text for date input mask from 01-01-1970 to 01-31-1970
mitchmoccia Jan 24, 2023
08fa2db
Merge develop
Apr 10, 2023
5eb16c8
Revert package-lock
Apr 10, 2023
a6efe63
Fix typo - Change 'defaulVal' to 'defaultVal'
Apr 13, 2023
53a0b8a
Add forcelower/forceupper controls in storybook
Apr 14, 2023
5f55796
Remove default message; remove usa-input-mask__message from twig
Apr 14, 2023
da48acc
Run prettier
Apr 14, 2023
5f0a61f
Remove usa-input-mask__message from all templates; remove usa-input-m…
Apr 14, 2023
9e92436
Replace usa-input-mask__field with usa-input-mask
Apr 14, 2023
9a49a4e
Replace usa-input-mask__field with usa-input-mask
Apr 17, 2023
b6e9ab2
Remove requirement to add a container in the markup
Apr 17, 2023
a16a662
Replace custom classes with usa-error-message and usa-sr-only
Apr 17, 2023
2b4e778
Use data attributes to customize status message text
Apr 17, 2023
5be10ed
Fix forceupper and forcelower attributes in twig
Apr 17, 2023
aa27c1f
Fix broken tab navigation
Apr 17, 2023
3cf7312
Fix broken unit tests
Apr 17, 2023
f40b333
Merge branch 'develop' of https://github.com/uswds/uswds into al-inpu…
Apr 18, 2023
1e70efa
Remove date short story
Apr 18, 2023
c255319
Revert SSN hint text to original
Apr 18, 2023
5c118b6
Update invalid character text
Apr 18, 2023
2639fb4
Update invalid number text in unit tests
Apr 18, 2023
64a5666
Remove hint-info markup from templates
Apr 19, 2023
d09fd32
Update phone inputmode to 'tel'
Apr 20, 2023
eaa6015
Add test story for custom hint text and multiple inputs
Apr 20, 2023
0eec7cd
Remove maxlength attribute from templates
Apr 20, 2023
fb9f314
Remove pattern attribute from main template
Apr 20, 2023
77f796d
Run prettier; format twig
Apr 20, 2023
eb07b65
Style update: align __content color with usa-hint; remove unnecessary…
Apr 20, 2023
c8344a5
Add empty space to srStatusMessage when hiding message
Apr 21, 2023
8f4f646
Add SR status message element to input's aria-describedby
Apr 21, 2023
dc5b6a3
Move multiple inputs test files to test/test-patterns
Apr 28, 2023
2b5bc8c
Add simpler, more realistic alphanumeric example
Apr 28, 2023
88e119a
Fix customTextContent import in stories.js
May 1, 2023
3b0b477
Remove for loop in inputMask behavior
May 1, 2023
ede9b6f
Throw error if input is missing mask or placeholder attributes
May 1, 2023
2c240c7
Remove period from invalid message
May 1, 2023
9d8007b
Remove redundant usa-sr-only class
May 1, 2023
dedeb14
Create extended 'invalid character' message for SR status messages
May 1, 2023
ff2b9e3
Change aria-live from assertive to polite
May 1, 2023
725f01e
Run lint and prettier:js
May 1, 2023
a8e7603
Remove need for statusEl params in updateMaskMessage() and hideMessag…
May 2, 2023
867c27d
Make MASK_INFO, setMaskInfo(), getMaskInfo() more readable
May 2, 2023
b633b7f
Rename getMatchValue --> removeFormatCharacters
May 2, 2023
559eee0
Move handlePaste to other event functions
May 3, 2023
5577768
Update formatting & spacing
May 3, 2023
50808ab
Use more accurate name for previous getPastedText()
May 3, 2023
04a9832
Fix comment formatting
May 4, 2023
a0332b3
Update randomly generated ID in createStatusMessages
May 4, 2023
35aff85
Remove getMaskedElements()
May 4, 2023
6056b4f
Validate on paste
May 4, 2023
eb4fa24
Add SSN example to test
May 5, 2023
f2ab13c
Add clarifying comments & rename minLength
May 5, 2023
42e9fcb
Refactor start of getValidPastedText()
May 9, 2023
9650705
Cleanup getValidPastedText(), use previous behavior for now.
May 10, 2023
24ca4f9
Merge pull request #5271 from uswds/jm-input-mask-paste
amyleadem May 15, 2023
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
Prev Previous commit
Next Next commit
Fix broken tab navigation
  • Loading branch information
Amy Leadem
Amy Leadem committed Apr 17, 2023
commit aa27c1fd5b36b95db8833ffb6cf99b68e650c146
5 changes: 0 additions & 5 deletions packages/usa-input-mask/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -840,11 +840,6 @@ const handleKeyDown = (inputEl, event) => {
[KEYS.left, KEYS.right, KEYS.up, KEYS.down, KEYS.tab].indexOf(keyCode) > -1;

if (movementKeys) {
if (checkMaskForLetters(inputEl.id)) {
event.preventDefault();
return false;
}

if (keyCode === KEYS.left && !checkAvailableLeft(inputEl, curPos)) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Removed code here in aa27c1f to fix disabled tab navigation. We should confirm this doesn't have negative impact.

Removed the following code:

    if (checkMaskForLetters(inputEl.id)) {
      event.preventDefault();
      return false;
    }

event.preventDefault();
return false;
Expand Down