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

Rerender component after change value and lost focus #782

Open
2 of 6 tasks
Dobroeutro1 opened this issue Aug 1, 2023 · 4 comments
Open
2 of 6 tasks

Rerender component after change value and lost focus #782

Dobroeutro1 opened this issue Aug 1, 2023 · 4 comments

Comments

@Dobroeutro1
Copy link

Dobroeutro1 commented Aug 1, 2023

Describe the issue and the actual behavior

Hello. I faced such problem. After entering the value in the input, my focus disappears. As a result of debugging, I found that the reason is the re-rendering of the input component after entering one character. Could you tell me what is the reason for this behavior.

I also noticed that this behavior appears if you build the project in webpack production mode. There is no such problem in development mode.

Describe the expected behavior

I expect focus to be saved when entering a value in an input

Provide steps to reproduce this issue

image image image

Please check the browsers where the issue is seen

  • Chrome
  • Chrome (Android)
  • Safari (OSX)
  • Safari (iOS)
  • Firefox
  • Firefox (Android)
@s-yadav
Copy link
Owner

s-yadav commented Aug 5, 2023

I suspect some additional thing is happening on your parent component. most likely you are breaking rule of reconciliation, can't say to confirm with the provided code.

@Dobroeutro1
Copy link
Author

Nothing else happens in my parent component. It simply renders the PatternFormat, sets up the state, and handles the state change.

@s-yadav
Copy link
Owner

s-yadav commented Aug 13, 2023

It would be easy for me to tell the reason if you can provide some repro link.

Also, can you tell which version are you using?

@hemantgogia09
Copy link

Same thing is happening with me only in webpack production. I am using 5.3.1.

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

3 participants