From 47c03d03c8a55a9e91065954935f8bde2be2dc12 Mon Sep 17 00:00:00 2001 From: "mr. m" Date: Sat, 27 Dec 2025 12:00:40 +0100 Subject: [PATCH] fix: Run a mouse tracker event on compact mode to check for closes, b=no-bug, c=compact-mode --- src/zen/compact-mode/ZenCompactMode.mjs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/zen/compact-mode/ZenCompactMode.mjs b/src/zen/compact-mode/ZenCompactMode.mjs index 65469e7b7..90cdfc9a1 100644 --- a/src/zen/compact-mode/ZenCompactMode.mjs +++ b/src/zen/compact-mode/ZenCompactMode.mjs @@ -716,8 +716,14 @@ window.gZenCompactModeManager = { // If we want the toolbars to be draggable, we need to make sure to check the hover state after a short delay. // This is because the mouse is left to be handled natively so firefox thinks the mouse left the window for a split second. setTimeout(() => { + let isHovered = event.target.matches(':hover'); + MousePosTracker._callListener({ + onMouseEnter: () => (isHovered = true), + onMouseLeave: () => {}, + getMouseTargetRect: () => window.windowUtils.getBoundsWithoutFlushing(target), + }); // Let's double check if the mouse is still hovering over the element, see the bug above. - if (event.target.matches(':hover')) { + if (isHovered) { return; }