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] Menu component breaks actions based on event delegation #6654

Closed
rogal111 opened this issue Mar 1, 2019 · 2 comments · Fixed by skyYaga/skdvin-webapp#18, skyYaga/skdvin-webapp#21 or anyulled/reactivewebflux#5 · May be fixed by andrebaldo/python-vue-spa-boilerplate#3
Assignees
Labels
C: VMenu VMenu T: bug Functionality that does not work as intended/expected
Milestone

Comments

@rogal111
Copy link

rogal111 commented Mar 1, 2019

Versions and Environment

Vuetify: 1.5.4
Vue: 2.6.7
Browsers: Chrome 72.0.3626.119
OS: Mac OS 10.14.0

Steps to reproduce

Please check reproduction link below

Expected Behavior

v-menu component shouldn't stop click event propagation from its children elements OR it should be configurable

Actual Behavior

v-menu component stops unconditionally click event propagation from its children elements.

Reproduction Link

https://codepen.io/rogal111/pen/gEPyQM

Other comments

e.stopPropagation() is called unconditionally on all click events triggered on menu component.

on: {
click: e => {
e.stopPropagation()
if (e.target.getAttribute('disabled')) return
if (this.closeOnContentClick) this.isActive = false
}
}

It breaks scripts that use event delegation pattern: https://gomakethings.com/why-event-delegation-is-a-better-way-to-listen-for-events-in-vanilla-js/.
For example rails ujs uses it: https://github.com/rails/rails/tree/master/actionview/app/assets/javascripts

Here is example: https://codepen.io/rogal111/pen/gEPyQM

@MajesticPotatoe MajesticPotatoe added the C: VMenu VMenu label Apr 9, 2019
@KaelWD
Copy link
Member

KaelWD commented May 28, 2019

This was added in f154158 and moved in 5be0050, might be safe to remove now. There's also a conflicting feature request #3333.

@johnleider
Copy link
Member

johnleider commented Jan 19, 2020

Was originally added in #417 to fix a bug that is no longer relevant. It also doesn't conflict with the fix for #3333

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