KEMBAR78
fix: use preventDefault for handling MDL escape press by web-padawan · Pull Request #10169 · vaadin/web-components · GitHub
Skip to content

Conversation

@web-padawan
Copy link
Member

@web-padawan web-padawan commented Sep 15, 2025

Description

Using stopPropagation() can be problematic in some cases. I noticed that vaadin-select inside of the MDL detail content doesn't close on Esc while reviewing #10157. Let's use preventDefault() instead as we do elsewhere, example:

return !this.disabled && !(event.type === 'keydown' && event.defaultPrevented);

Type of change

  • Bugfix

@sonarqubecloud
Copy link

@web-padawan web-padawan merged commit 8956df8 into main Sep 16, 2025
9 checks passed
@web-padawan web-padawan deleted the fix/mdl-esc-keydown-prevent branch September 16, 2025 06:48
web-padawan added a commit that referenced this pull request Sep 16, 2025
Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
web-padawan added a commit that referenced this pull request Sep 16, 2025
Co-authored-by: Serhii Kulykov <iamkulykov@gmail.com>
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 25.0.0-alpha12.

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.

3 participants