From 563bf76beee7dbb48c58f9403d95e3c1669f7796 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Fri, 11 Mar 2022 17:01:22 -0600 Subject: [PATCH] setupHoldToClick calls stop on unmount --- src/util/vue.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/vue.tsx b/src/util/vue.tsx index 6bd8866..6aee73f 100644 --- a/src/util/vue.tsx +++ b/src/util/vue.tsx @@ -14,6 +14,7 @@ import { DefineComponent, defineComponent, isRef, + onUnmounted, PropType, ref, Ref, @@ -113,6 +114,8 @@ export function setupHoldToClick( } } + onUnmounted(stop); + return { start, stop, handleHolding }; }