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

problems with v-model and <select size=N> #3844

Closed
jimparis opened this issue May 29, 2021 · 2 comments · Fixed by #3845
Closed

problems with v-model and <select size=N> #3844

jimparis opened this issue May 29, 2021 · 2 comments · Fixed by #3845
Labels
❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. has workaround A workaround has been found to avoid the problem 🐞 bug Something isn't working

Comments

@jimparis
Copy link

Version

3.0.11

Reproduction link

at sfc.vuejs.org

Steps to reproduce

When using v-model with a <select size=N>, any re-rendering causes the selection to reset from whatever the mouse is currently clicking on, causing it to be glitchy and unreliable. Note that mobile browsers seem to ignore size so you'll see it only on desktop browsers.

The linked reproduction uses a timer to change a counter unrelated to the <select>. You'll notice that clicking on any items in the selection list box doesn't work, unless the click was fast enough to happen between counter updates.

What is expected?

User should be able to change selection freely

What is actually happening?

Vue keeps changing the selection back away from what the user is trying to click on


Noticed on Vue 2, upgraded project to Vue 3 with same results.

@posva posva added 🐞 bug Something isn't working ❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. has workaround A workaround has been found to avoid the problem labels May 29, 2021
@posva
Copy link
Member

posva commented May 29, 2021

As a workaround you can isolate the select in a component

@jimparis
Copy link
Author

As a workaround you can isolate the select in a component

That worked, thank you!

@github-actions github-actions bot locked and limited conversation to collaborators Oct 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. has workaround A workaround has been found to avoid the problem 🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants