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

fix: prevent opening select on click or keydown when disabled #7874

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

web-padawan
Copy link
Member

@web-padawan web-padawan commented Sep 26, 2024

Description

Fixes #7873

By setting pointer-events: auto it is currently possible to make vaadin-select flash opening on click since we don't check for disabled property in click listener. After adding the check, I also noticed that vaadin-select-value-button still receives focus which also means the same problem can happen on pressing Enter so I updated keydown listener too.

Type of change

  • Bugfix

Note

I think it's weird that focused is set on the select and value button when setting pointer-events: auto on the host.
Disabled component shouldn't receive focus in any case. I'll make a separate PR to address that problem.

Copy link

sonarcloud bot commented Sep 26, 2024

@web-padawan web-padawan merged commit 03147eb into main Sep 26, 2024
9 checks passed
@web-padawan web-padawan deleted the fix/select-disabled-click-enter branch September 26, 2024 12:50
web-padawan added a commit that referenced this pull request Sep 26, 2024
web-padawan added a commit that referenced this pull request Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[select] Overlay opens and closes immediately when disabled and pointer-events: auto
3 participants