[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:
parent
88d01efff3
commit
ad9804b051
@ -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();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user