diff --git a/packages/client/src/os.ts b/packages/client/src/os.ts index 9eac06a5e3bfc6ca62e2c49e8d27f5f24da363a8..48a558a363cd50d8d225c3ce0b58579a7502848a 100644 --- a/packages/client/src/os.ts +++ b/packages/client/src/os.ts @@ -12,6 +12,16 @@ import { resolve } from '@/router'; import { $i } from '@/account'; import { defaultStore } from '@/store'; +export let isScreenTouching = false; + +window.addEventListener('touchstart', () => { + isScreenTouching = true; +}, { passive: true }); + +window.addEventListener('touchend', () => { + isScreenTouching = false; +}, { passive: true }); + export const stream = markRaw(new Misskey.Stream(url, $i)); export const pendingApiRequestsCount = ref(0); diff --git a/packages/client/src/scripts/use-tooltip.ts b/packages/client/src/scripts/use-tooltip.ts index 2c0c36400d185fb09dde59a646b9ca6839ff3717..89e6b1be9d64471c9e328f04e627c8eb628f73af 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 = () => {