Don't open account hover card unless preceded by mouse movement (#39166)

This commit is contained in:
diondiondion 2026-05-26 12:24:38 +02:00 committed by GitHub
parent cc03e381ef
commit 0275a97888
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -144,11 +144,16 @@ export const HoverCardController: React.FC = () => {
setScrollTimeout(handleScrollEnd, 100); setScrollTimeout(handleScrollEnd, 100);
}; };
const handleMouseMove = () => { const handleMouseMove = (e: MouseEvent) => {
if (isUsingTouch) { if (isUsingTouch) {
isUsingTouch = false; isUsingTouch = false;
} }
const hasMoved = Math.max(e.movementX, e.movementY) > 0;
if (!hasMoved) {
return;
}
delayEnterTimeout(enterDelay); delayEnterTimeout(enterDelay);
cancelMoveTimeout(); cancelMoveTimeout();