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

[Bug Report][3.7.5] v-textfield events key are not dispatched when placed in a v-menu #20755

Closed
lfirdion opened this issue Dec 4, 2024 · 1 comment

Comments

@lfirdion
Copy link

lfirdion commented Dec 4, 2024

Environment

Vuetify Version: 3.7.5
Vue Version: 3.4.15
Browsers: Chrome 131.0.0.0
OS: Linux x86_64

Steps to reproduce

  • insert a v-textfield with a key event inside a v-menu
  • the v-menu catches and prevents the key event originated from the v-textfield (even with .stop or .prevent modifier)

Expected Behavior

the v-textfield event keypress should not be prevented by the v-menu event hander

Actual Behavior

the key press event emmited by the v-textfield is prevented and can't be used (i.e. I want to redirect user to a result page when they press enter after typing in the v-textfield)

Reproduction Link

https://play.vuetifyjs.com/#...

Other comments

I saw the workaround with using a v-form around and using a @submit event (issue #19920) but that won't cover 100% of use cases

@KaelWD
Copy link
Member

KaelWD commented Dec 5, 2024

You need @keydown.enter.stop too (or instead) so the menu can't call preventDefault.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants