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

q-item inside q-menu does not emit click events #17891

Closed
DocBouCou opened this issue Mar 8, 2025 · 1 comment
Closed

q-item inside q-menu does not emit click events #17891

DocBouCou opened this issue Mar 8, 2025 · 1 comment
Labels
area/components bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-webpack kind/bug 🐞 Qv2 🔝 Quasar v2 issues

Comments

@DocBouCou
Copy link
Contributor

DocBouCou commented Mar 8, 2025

What happened?

I am using a list of items inside a q-menu.
These items should be clickable to trigger a method (and do something else). But I cannot manage to get the click event working with the q-items.

I spent time trying to make the codepen works (even had to create an account on codepen). So I hope it is clear enough.

What did you expect to happen?

I expect that q-item can trigger click event. But only q-item-section and q-item-label are. If the q-menu is outside a q-input, it works. Edit: In fact even if the q-menu is outside a q-input it does not trigger the click event (sorry).

Reproduction URL

https://codepen.io/DocBoucou111/pen/yyLoLKR

How to reproduce?

  1. go to the reproduction link (I am not using composition api, so it is probably badly written but it works)
  2. click in the input or on notify so the menu shows up
  3. click on one of the item
  4. look at the console: only "click label" and "click section" are written.
  5. comment the <q-input> (and the </q-input>)
  6. click on button to see the menu, click on the item
  7. you see that item, section and label are clicked section and label are clicked

Flavour

Quasar CLI with Webpack (@quasar/cli | @quasar/app-webpack)

Areas

Components (quasar)

Platforms/Browsers

Firefox

Quasar info output

Relevant log output

Additional context

No response

@DocBouCou DocBouCou added kind/bug 🐞 Qv2 🔝 Quasar v2 issues labels Mar 8, 2025
@github-actions github-actions bot added area/components bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-webpack labels Mar 8, 2025
@DocBouCou DocBouCou changed the title q-item inside q-menu inside q-input do not show click events q-item inside q-menu does not show click events Mar 12, 2025
@DocBouCou DocBouCou changed the title q-item inside q-menu does not show click events q-item inside q-menu does not emit click events Mar 14, 2025
@DocBouCou
Copy link
Contributor Author

I checked again, and I realized there was some typo in my code on the clickable prop of the q-item. So, if there is "clickable" correctly written it works. Sorry for that, I close the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/components bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-webpack kind/bug 🐞 Qv2 🔝 Quasar v2 issues
Projects
None yet
Development

No branches or pull requests

1 participant