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

Rendering issue with input when characters are typed very fast #1565

Closed
pepsighan opened this issue Jul 11, 2020 · 1 comment
Closed

Rendering issue with input when characters are typed very fast #1565

pepsighan opened this issue Jul 11, 2020 · 1 comment

Comments

@pepsighan
Copy link

pepsighan commented Jul 11, 2020

Version

3.0.0-beta.20

Reproduction link

https://github.com/pepsighan/sudoku

Flicker

Steps to reproduce

  • Run the app.
  • Go to the home page.
  • Select any one of the given cell.
  • Start typing numbers like crazy.

The input is expected to render only one character at a time. But once in a while, it will show 2 or 3 characters being rendered.
This did not happen in vue 2. Reproduction of the same thing in vue 2: https://codesandbox.io/s/admiring-glade-5uevy. Sorry, I could not create a vue 3 sandbox.

What is expected?

The input field should not render the value which is not in the v-model state.

What is actually happening?

The input field is rendering characters which are no longer in the state.

@pepsighan
Copy link
Author

pepsighan commented Jul 12, 2020

I fixed the issue in vue 3 by merging the keydown event handlers into one:
Before
https://github.com/pepsighan/sudoku/blob/730d942967e94bc1bc40160beecfea7dfefe1f3a/src/views/Home.vue#L18-L22

After
https://github.com/pepsighan/sudoku/blob/951fbeb6a21486e12c3462d62c01c82ff5c6602e/src/views/Home.vue#L18-L20

But providing separate event handlers worked just fine in vue 2. What might be the problem?

@github-actions github-actions bot locked and limited conversation to collaborators Nov 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant