Skip to content

Commit

Permalink
fix(QScrollArea): backport from Qv2 - mouse events on content trigger…
Browse files Browse the repository at this point in the history
… on first tap in iOS quasarframework#16210
  • Loading branch information
pdanpdan committed Oct 21, 2023
1 parent 38f0c00 commit 3e23746
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion ui/src/components/scroll-area/QScrollArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,23 @@ export default Vue.extend({
},

__mouseEnter () {
this.hover = true
if (this.mouseEventTimer !== void 0) {
clearTimeout(this.mouseEventTimer)
}

// setTimeout needed for iOS; see ticket #16210
this.mouseEventTimer = setTimeout(() => {
this.mouseEventTimer = void 0
this.hover = true
}, this.$q.platform.is.ios === true ? 50 : 0)
},

__mouseLeave () {
if (this.mouseEventTimer !== void 0) {
clearTimeout(this.mouseEventTimer)
this.mouseEventTimer = void 0
}

this.hover = false
}
},
Expand Down

0 comments on commit 3e23746

Please sign in to comment.