Bug 1965742 - Don't add/remove MosPosTracker listeners for tab preview popups r=sidebar-reviewers,jsudiaman

Differential Revision: https://phabricator.services.mozilla.com/D248958
This commit is contained in:
Kelly Cochrane
2025-05-12 19:49:18 +00:00
committed by kcochrane@mozilla.com
parent 637971b2cb
commit b9f3692262

View File

@@ -2076,17 +2076,21 @@ var SidebarController = {
case "popupshown":
this.mouseEnterTask?.disarm();
/* Temporarily remove MousePosTracker listener when a context menu is open */
MousePosTracker.removeListener(this);
if (e.composedTarget.id !== "tab-preview-panel") {
MousePosTracker.removeListener(this);
}
break;
case "popuphidden":
if (this._state.launcherExpanded) {
if (this._animationEnabled && !window.gReduceMotion) {
this._animateSidebarMain();
if (e.composedTarget.id !== "tab-preview-panel") {
if (this._state.launcherExpanded) {
if (this._animationEnabled && !window.gReduceMotion) {
this._animateSidebarMain();
}
this._state.launcherExpanded = false;
}
this._state.launcherExpanded = false;
await this.waitUntilStable();
MousePosTracker.addListener(this);
}
await this.waitUntilStable();
MousePosTracker.addListener(this);
break;
default:
break;