From 7cac23370333e1281e8faa2a68318ea512a6cbdc Mon Sep 17 00:00:00 2001 From: KMY Date: Tue, 6 Aug 2024 08:52:23 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20#773=20=E3=82=A2=E3=82=AB=E3=82=A6?= =?UTF-8?q?=E3=83=B3=E3=83=88=E3=81=AE=E3=83=9B=E3=83=90=E3=83=BC=E3=82=AB?= =?UTF-8?q?=E3=83=BC=E3=83=89=E3=81=AE=E7=84=A1=E5=8A=B9=E5=8C=96=E3=82=92?= =?UTF-8?q?=E8=A7=A3=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mastodon/components/hover_card_controller.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/javascript/mastodon/components/hover_card_controller.tsx b/app/javascript/mastodon/components/hover_card_controller.tsx index 94c6d372caf26a..057ef1aaed4a71 100644 --- a/app/javascript/mastodon/components/hover_card_controller.tsx +++ b/app/javascript/mastodon/components/hover_card_controller.tsx @@ -16,8 +16,8 @@ const enterDelay = 750; const leaveDelay = 150; const popperConfig = { strategy: 'fixed' } as UsePopperOptions; -const isHoverCardAnchor = (/*element: HTMLElement*/) => false; // set false until original is fixed some problem about this hover -// element.matches('[data-hover-card-account]'); +const isHoverCardAnchor = (element: HTMLElement) => + element.matches('[data-hover-card-account]'); export const HoverCardController: React.FC = () => { const [open, setOpen] = useState(false); @@ -70,7 +70,7 @@ export const HoverCardController: React.FC = () => { } // We've entered an anchor - if (!isScrolling && isHoverCardAnchor(/*target*/)) { + if (!isScrolling && isHoverCardAnchor(target)) { cancelLeaveTimeout(); currentAnchor?.removeAttribute('aria-describedby');