[Glitch] Don't open account hover card unless preceded by mouse movement

Port 0275a978888516e68256acefd76f2238c99c9b01 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
diondiondion 2026-05-26 12:24:38 +02:00 committed by Claire
parent 88d01efff3
commit ad9804b051

View File

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