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

[fields] Fix Android editing #7444

Merged
merged 2 commits into from
Jan 10, 2023

Conversation

flaviendelangle
Copy link
Member

Part of #7440

In Android, we have 2 onChange, for the 1st one we need to just store the result as is in the input.
Since the RTL PR, we were storing the clean value (without the RTL characters), which was causing shift in the edited layout on the 2nd onChange.

@flaviendelangle flaviendelangle self-assigned this Jan 9, 2023
@flaviendelangle flaviendelangle added bug 🐛 Something doesn't work component: pickers This is the name of the generic UI component, not the React module! labels Jan 9, 2023
@mui-bot
Copy link

mui-bot commented Jan 9, 2023

Messages
📖 Netlify deploy preview: https://deploy-preview-7444--material-ui-x.netlify.app/

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 603.1 982.2 629.2 740.6 157.486
Sort 100k rows ms 578.3 1,086.3 787 843.6 164.967
Select 100k rows ms 195.9 285.2 242 238.24 29.487
Deselect 100k rows ms 134.2 277.5 185.9 192.8 48.651

Generated by 🚫 dangerJS against 6397e99

Copy link
Member

@alexfauquette alexfauquette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was hard to reproduce. I don't have the bug with Gboard.

What about adding a test to catch this error?

@flaviendelangle
Copy link
Member Author

Do you have an idea of how to test those Android-only behaviors ?

@alexfauquette
Copy link
Member

I was thinking about firing an onChange with the section deleted and a second one with the typed value. But it would also require modifying the userAgent otherwise isAndroid() will not work

@flaviendelangle
Copy link
Member Author

I added two tests 👍

@flaviendelangle flaviendelangle merged commit 8cfc4d9 into mui:next Jan 10, 2023
@flaviendelangle flaviendelangle deleted the android-field-rtl branch January 10, 2023 09:58
@flaviendelangle
Copy link
Member Author

flaviendelangle commented Feb 6, 2023

1st bug reproduced, that's not specific to Android, #7834

@flaviendelangle
Copy link
Member Author

2nd bug reproduced.
This one is interesting. The Backspace logic is not handled by the onChange to it does not work on Android...
I created #7835 because it's not a trivial change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: pickers This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants