MudBlazor / MudBlazor

Blazor Component Library based on Material design with an emphasis on ease of use. Mainly written in C# with Javascript kept to a bare minimum it empowers .NET developers to easily debug it if needed.
http://mudblazor.com
MIT License
8.05k stars 1.28k forks source link

MudTextField component always renders inputmode attribute in the generated HTML. #6918

Open GrigoreCojusneanu opened 1 year ago

GrigoreCojusneanu commented 1 year ago

Bug type

Component

Component name

MudTextField

What happened?

MudTextField component always renders inputmode attribute in the generated HTML.

< input class="mud-input-slot mud-input-root mud-input-root-text" type="number" inputmode="text" maxlength="524288" aria-invalid="false" _bl_2="">

Expected behavior

<input class="mud-input-slot mud-input-root mud-input-root-text" type="number" inputmode="text" maxlength="524288" aria-invalid="false" _bl_2="">

The Problem: To show the Number and Punctuation keyboard (https://cdn.hashnode.com/res/hashnode/image/upload/v1653170593942/bmDmsyJ8A.png) for iOS (iPhone), the inputmode parameter should not be rendered (it changes the keyboard type). If we make the inputmode parameter nullable, and when it is nullable not to be rendered in HTML, then it would solve the problem very easily.

Reproduction link

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

Reproduction steps

  1. Place a MudTextField element on a page
  2. Observe the generated HTML

Relevant log output

No response

Version (bug)

6.10.0

Version (working)

6.10.0

What browsers are you seeing the problem on?

Firefox, Chrome, Microsoft Edge, Safari

On what operating system are you experiencing the issue?

Windows, Mac OSX, iOS, Android

Pull Request

Code of Conduct

github-actions[bot] commented 1 year ago

👋 Thanks for wanting to do a PR @GrigoreCojusneanu ! We suggest that you wait for an answer from @MudBlazor/contribution-team @MudBlazor/core-team . Otherwise we can not guarantee that your PR will be merged. As the library grows, we have to be very strict what PRs we can accept.

GrigoreCojusneanu commented 1 year ago

@henon, @ScarletKuro, Dear authors, is there any news on this topic, it's an easy thing to fix and we haven't had any updates for half a year. Could you please come back with some feedback?

henon commented 1 year ago

Hi @GrigoreCojusneanu, thanks for tagging us, because we can't read every issue, there are just too many.

Do you propose to remove the attribute in general or only for IOS? Because I have no idea whether or not this has any unintended consequences on Android, Desktop, etc. Or can you test this? In any case, please go ahead and PR (and tag us). We can continue the discussion in the PR.