Message: Fix quick reaction freezing when moving the mouse (#3101)

Co-authored-by: Alexander Zinchuk <alx.zinchuk@gmail.com>
This commit is contained in:
Alexander Zinchuk 2023-04-27 18:53:25 +04:00
parent c69bdb0c06
commit f06ecc04b6

View File

@ -181,7 +181,9 @@ export default function useOuterHandlers(
]);
function handleMouseLeave(e: React.MouseEvent<HTMLDivElement>) {
unmarkQuickReactionVisible();
// Because `mousemove` event is throttled, we need to also throttle `mouseleave` event,
// so the order of events is preserved
requestMeasure(unmarkQuickReactionVisible);
if (shouldHandleMouseLeave) handleDocumentGroupMouseLeave(e);
}