This commit is contained in:
Shpuld Shpuldson 2020-07-22 14:41:06 +03:00
parent 0f862e3512
commit 7cf6fc32c0
1 changed files with 3 additions and 0 deletions

View File

@ -159,6 +159,7 @@ const Popover = {
this.hidePopover() this.hidePopover()
} }
} else if (this.trigger === 'hover' && this.isMobileLayout) { } else if (this.trigger === 'hover' && this.isMobileLayout) {
console.log(this.isMobileLayout)
// This is to enable using hover stuff with mobile: // This is to enable using hover stuff with mobile:
// on first touch it opens the popover, when touching the trigger // on first touch it opens the popover, when touching the trigger
// again it will do the click action. Can't use touch events as // again it will do the click action. Can't use touch events as
@ -176,6 +177,8 @@ const Popover = {
if (this.hidden) return if (this.hidden) return
if (this.$el.contains(e.target)) return if (this.$el.contains(e.target)) return
this.hidePopover() this.hidePopover()
e.preventDefault()
e.stopPropagation()
} }
}, },
updated () { updated () {