Skip to content

Commit

Permalink
fix(Popover/Dropdown): prevent unintended closure on touchstart in mo…
Browse files Browse the repository at this point in the history
…bile devices (#1609)
  • Loading branch information
vahid-bagheri committed Apr 3, 2024
1 parent 36055ba commit 2392b4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/runtime/components/elements/Dropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ export default defineComponent({
}
})
function onTouchStart () {
if (!menuApi.value) {
function onTouchStart (event: TouchEvent) {
if (!event.cancelable || !menuApi.value) {
return
}
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/components/overlays/Popover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ export default defineComponent({
}
})
function onTouchStart () {
if (!popoverApi.value) {
function onTouchStart (event: TouchEvent) {
if (!event.cancelable || !popoverApi.value) {
return
}
Expand Down

0 comments on commit 2392b4a

Please sign in to comment.