Skip to content

Commit

Permalink
fix(VDialog/VMenu): enable pointer-events for disabled menu/dialog ac…
Browse files Browse the repository at this point in the history
…tivator

fixes #5472
  • Loading branch information
jacekkarczmarczyk committed Nov 19, 2018
1 parent 3242321 commit 7fd37bf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
4 changes: 2 additions & 2 deletions packages/vuetify/src/components/VDialog/VDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ export default {
'class': {
'v-dialog__activator--disabled': this.disabled
},
on: {
on: this.disabled ? {} : {
click: e => {
e.stopPropagation()
if (!this.disabled) this.isActive = !this.isActive
this.isActive = !this.isActive
}
}
}, [this.$slots.activator]))
Expand Down
12 changes: 7 additions & 5 deletions packages/vuetify/src/components/VMenu/mixins/menu-generators.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ export default {
on: {}
}

if (this.openOnHover) {
options.on['mouseenter'] = this.mouseEnterHandler
options.on['mouseleave'] = this.mouseLeaveHandler
} else if (this.openOnClick) {
options.on['click'] = this.activatorClickHandler
if (!this.disabled) {
if (this.openOnHover) {
options.on['mouseenter'] = this.mouseEnterHandler
options.on['mouseleave'] = this.mouseLeaveHandler
} else if (this.openOnClick) {
options.on['click'] = this.activatorClickHandler
}
}

return this.$createElement('div', options, this.$slots.activator)
Expand Down
3 changes: 0 additions & 3 deletions packages/vuetify/src/stylus/components/_dialogs.styl
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
*
cursor: pointer

&--disabled
pointer-events: none

&__container
display: inline-block
vertical-align: middle
Expand Down
3 changes: 0 additions & 3 deletions packages/vuetify/src/stylus/components/_menus.styl
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
*
cursor: pointer

&--disabled
pointer-events: none

&__content
position: absolute
display: inline-block
Expand Down

0 comments on commit 7fd37bf

Please sign in to comment.