mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
https://mui.com/x/
4.07k stars 1.26k forks source link

[fields][DateField] on Android: using DateField on firefox doesn't work #13854

Open shirRefundco opened 2 months ago

shirRefundco commented 2 months ago

Steps to reproduce

Link to live example: (required)

Steps:

  1. Install mobile firefox on Android
  2. implement the dateField component
  3. try fo fill in the dates

Current behavior

No digit is working except of 1.

Expected behavior

You can put any month (for example)

Context

No response

Your environment

npx @mui/envinfo System: OS: macOS 11.3.1 Binaries: Node: 18.18.0 - ~/.nvm/versions/node/v18.18.0/bin/node npm: 9.8.1 - ~/.nvm/versions/node/v18.18.0/bin/npm pnpm: Not Found Browsers: Chrome: 126.0.6478.127 Edge: Not Found Safari: 14.1 npmPackages: typescript: ~5.2.2 => 5.2.2

Search keywords: Datefield, android, mobile, firefox

michelengelen commented 2 months ago

@LukasTy another android bug to fix :/

Maybe even related to #13620 ?

LukasTy commented 2 months ago

The problem could be related to how Firefox controls the keyboard. @shirRefundco could you clarify if a numeric or text (regular messaging) keyboard is open when you experience this issue? Chrome on Android always opens "numeric" keyboard when requested and works without problems.

Locally forcing numeric inputMode avoids this problem.

So, Firefox on Android is unhappy about the dynamically changing inputMode (it changes to numeric only after a numeric section is focused).

P.S. I've locally debugged both Chrome and Firefox and it seems that Chrome is working fine with text inputMode. This could be a problem with Firefox event handling. When trying to enter value in input the given section ends up containing 3 characters instead of 2 and we fail parsing those. 🙈

rrrVali commented 1 month ago

@LukasTy I am having a similar issue. As far as I can see, it is a regular keyboard and not a numeric one. Tried to remove firefox and re-install, didn't help. Also, it works fine on Chrome.

LukasTy commented 1 month ago

@rrrVali Thank you for the confirmation. 👍 Those were my findings as well.