MudTextField with Mask enabled has unexpected behavior on mobile browsers
#4 487 ouverte le 25 avr. 2022
Métriques du dépôt
- Stars
- (10 394 étoiles)
- Métriques de merge PR
- (Merge moyen 6j 6h) (108 PRs mergées en 30 j)
Description
Bug type
Component
Component name
MudMask MudTextField
What happened?
When we set up a MudTextField with a Mask, everything works fine on desktop browsers. If we go to a real mobile browser, it will not get the updated value as we fill. An example is this simple code :
<MudTextField T="string" Label="CEP" Variant="Variant.Outlined" HelperTextOnFocus="true" HelperText="Rua do titular da conta"
InputType="InputType.Text" Mask="@(new PatternMask("00.000-000"))"
Required="true" RequiredError="CEP é obrigatório">
</MudTextField>
This makes the Required property not work correctly. This also impacts Validator behaviour. This is probably connected to events being handled.
Expected behavior
Expected behaviour is when using mask, even on mobile browsers at least the correct value is passed ahead for validators and MudBlazor actions. Ideal behaviour is Mask being applied at least when focus is out or value is detected as changed, since using ValueChanged works pretty OK.
Reproduction link
https://try.mudblazor.com/snippet/QuQmOymJeZQhVpOu
Reproduction steps
- Create a MudTextField
- Add PatternMask
- Enable any validation, like Required or Validation func.
- Open on real mobile browser
- Fill the MudTextField
Relevant log output
No response
Version (bug)
6.0.10
Version (working)
No response
What browsers are you seeing the problem on?
Chrome, Microsoft Edge
On what operating system are you experiencing the issue?
Android
Pull Request
- I would like to do a Pull Request
Code of Conduct
- I agree to follow this project's Code of Conduct