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

QSelect's weird bug that would break the focus function (e.g. autofocus directive) #11767

Closed
pdanpdan opened this issue Dec 23, 2021 Discussed in #11748 · 1 comment
Closed
Labels

Comments

@pdanpdan
Copy link
Collaborator

pdanpdan commented Dec 23, 2021

Discussed in #11748

Originally posted by guogangj December 22, 2021
QSelect has a feature that handles the enter key. I found a bug about the enter key. Focus on a QSelect component then press the enter key very quickly, then the QSelect will show and hide the option list very quickly. It seems all right. However, that problem comes! You will find that autofocus will not work anymore until you refresh the whole page. Not only autofocus directive, but also any other functions relative to focus.

Briefly, the quickly enter key pressed on QSelect will break the browser's focus function.

I made a demo here: codepen

At the beginning, use the toggle to show the input, the input will get focus. You can try multiple times. However, if you do "quickly enters on QSelect", then you will find the autofocus is broken.


Additional notes 1, I found it's not the enter key's problem, it should be the dropdown list's problem, I reproduced the problem with mouse operation.

Additional notes 2, I tried that at Chrome, Edge, Firefox, it acted same.

qselect-focus-bug.mp4

Related to this: 0928fd8

@rstoenescu
Copy link
Member

rstoenescu commented Dec 29, 2021

Fix will be available in Quasar v2.4.3 & v1.17.0

rstoenescu added a commit that referenced this issue Dec 29, 2021
… times; improve algorithm and protect against future failures #11767
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants