mirror of
https://github.com/zen-browser/desktop.git
synced 2025-12-28 09:04:42 +00:00
fix: Run a mouse tracker event on compact mode to check for closes, b=no-bug, c=compact-mode
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user