Skip to content

Commit

Permalink
fix(VNavigationDrawer): always bind mouseover events (#14523)
Browse files Browse the repository at this point in the history
fixes #13309
  • Loading branch information
johnleider committed Dec 23, 2021
1 parent 1623e6c commit 03e683f
Showing 1 changed file with 3 additions and 6 deletions.
Expand Up @@ -351,6 +351,8 @@ export default baseMixins.extend({
},
genListeners () {
const on: Record<string, (e: Event) => void> = {
mouseenter: () => (this.isMouseover = true),
mouseleave: () => (this.isMouseover = false),
transitionend: (e: Event) => {
if (e.target !== e.currentTarget) return
this.$emit('transitionend', e)
Expand All @@ -366,11 +368,6 @@ export default baseMixins.extend({
on.click = () => this.$emit('update:mini-variant', false)
}

if (this.expandOnHover) {
on.mouseenter = () => (this.isMouseover = true)
on.mouseleave = () => (this.isMouseover = false)
}

return on
},
genPosition (name: 'prepend' | 'append') {
Expand Down Expand Up @@ -442,7 +439,7 @@ export default baseMixins.extend({
!this.$el
) return 0

const width = Number(this.computedWidth)
const width = Number(this.miniVariant ? this.miniVariantWidth : this.width)

return isNaN(width) ? this.$el.clientWidth : width
},
Expand Down

0 comments on commit 03e683f

Please sign in to comment.