vue3-touch-events
vue3-touch-events copied to clipboard
confirm inside v-touch:hold-handler prevents at least the execution of one subsequent v-touch:hold-event in chrome
System: Windows 10 / Chrome 92.0.4515.131
Problem: A windows.confirm() inside a v-touch:hold handler prevents at least the execution of one subsequent v-touch:hold-event in chrome. This even happens when i place the confirm() call inside a setTimeout() function.
It works perfectly with firefox.
Example (snippets):
<button v-touch:hold="onTouchHold">TEST</button>
methods: {
onTouchHold() {
console.log("touchhold")
if (confirm("Confirm?")) { //works without...
this.variable = 1
} //...this if-confirm-block
},
}
Call the confirm() in an async function or callback set with setTimeout
.