summaryrefslogtreecommitdiff
path: root/packages/client/src/scripts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-11-27 18:29:23 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-11-27 18:29:23 +0900
commit698e0d08a121a9a00e5c5f71ee44a276d4995f08 (patch)
tree25b8e4a6ea1dc7c1a740d75e1d0a50a1c0f2edc4 /packages/client/src/scripts
parentfix: notification.vueのIntersectionObserverまわりを修正 (#8010) (diff)
downloadsharkey-698e0d08a121a9a00e5c5f71ee44a276d4995f08.tar.gz
sharkey-698e0d08a121a9a00e5c5f71ee44a276d4995f08.tar.bz2
sharkey-698e0d08a121a9a00e5c5f71ee44a276d4995f08.zip
fix(client): モバイルでタップしたときにツールチップが表示される問題を修正
Diffstat (limited to 'packages/client/src/scripts')
-rw-r--r--packages/client/src/scripts/use-tooltip.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/client/src/scripts/use-tooltip.ts b/packages/client/src/scripts/use-tooltip.ts
index 2c0c36400d..89e6b1be9d 100644
--- a/packages/client/src/scripts/use-tooltip.ts
+++ b/packages/client/src/scripts/use-tooltip.ts
@@ -1,3 +1,4 @@
+import { isScreenTouching } from '@/os';
import { Ref, ref } from 'vue';
export function useTooltip(onShow: (showing: Ref<boolean>) => void) {
@@ -10,6 +11,10 @@ export function useTooltip(onShow: (showing: Ref<boolean>) => void) {
close();
if (!isHovering) return;
+ // iOS(Androidも?)では、要素をタップした直後に(おせっかいで)mouseoverイベントを発火させたりするため、その対策
+ // これが無いと、画面に触れてないのにツールチップが出たりしてしまう
+ if (!isScreenTouching) return;
+
const showing = ref(true);
onShow(showing);
changeShowingState = () => {