Changing hidden input breaks the entered value again #1449 #1455
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #1449
What is the new behavior?
While setting hiddenInput to null use to do the trick it doesn't anymore. And setting hiddenInput to
false
will clash with parameters of the ngx-mask. The updated testing reveals some of those issues and null checking hiddenInput doesn't fix them all. These changes do.There is a new PasteTest function and new behavior for TypeTest. They mimic the events that would occur with a human using the ngx-mask input in a browser. This shows several breaking test cases and including the ones in secure-mask.spec.ts that should be broken with the changes in 18.0.1. I also updated some of the specs test cases to pass while keeping each test cases' intentions.
Now the code will check if there are
symbol_star
s (*) in the value to process the input back to its true value when hiddenInput isfalse
.I also fix a issue with inputs with multiple mask types and those masks have specialCharacters (UK POST - S0 0SS||SAA 0SS||SS0A 0SS). It wasn't selecting the correct mask type on typing. Demo here: https://stackblitz.com/edit/stackblitz-starters-n8bkaa?file=src%2Fmain.ts
Does this PR introduce a breaking change?
Other information
Please let me know if you have feedback or questions.