Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MudTextField with numeric input mode and type not binding properly when an e is in the text of the field #9089

Open
1 of 2 tasks
stephajn opened this issue May 30, 2024 · 0 comments

Comments

@stephajn
Copy link

Bug type

Component

Component name

MudTextField

What happened?

If I have a MudTextField bound to an underlying string value, but I put the InputMode to InputMode.numeric and InputType to InputType.Number, and then type in a number with the letter "e" in it, then the two way binding breaks. The text of the field still stays and does not respond to nulling out the underlying model property.

Expected behavior

The text field should stay in sync with the underlying model property it is bound to.

Reproduction link

https://try.mudblazor.com/snippet/QucoEfROppVLDSwS

Reproduction steps

Using the provided Reproduction link:

  1. Type in an all numbers value like "1234"
  2. Click the Clear Value button. (The value clears as expected)
  3. Type in a value like "e1234" or "12e34"
  4. Click the Clear Value button. (The value does not clear and the MudTextField updates as if it has no text in it)

Relevant log output

No response

Version (bug)

6.19.1

Version (working)

No response

What browsers are you seeing the problem on?

Chrome

On which operating systems are you experiencing the issue?

Windows

Pull Request

  • I would like to do a Pull Request

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant