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

fix(VNavigationDrawer): always bind mouseover events #14523

Merged
merged 1 commit into from
Dec 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
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),
Comment on lines +354 to +355
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible that these two lines should be added only if (this.expandOnHover), like it was before?

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)
KaelWD marked this conversation as resolved.
Show resolved Hide resolved

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