fix: Fixed using the wrong window for glance dragging detection, b=no-bug, c=glance

This commit is contained in:
mr. m
2025-11-23 21:59:41 +01:00
parent 9e1f272e29
commit b2ea2d4420

View File

@@ -83,7 +83,7 @@ export class ZenGlanceChild extends JSWindowActorChild {
return;
}
this.#glanceTarget = target;
window.addEventListener('mousemove', this.mousemoveCallback, { once: true });
this.contentWindow.addEventListener('mousemove', this.mousemoveCallback, { once: true });
}
on_mouseup(event) {
@@ -92,8 +92,8 @@ export class ZenGlanceChild extends JSWindowActorChild {
event.stopPropagation();
this.#openGlance(this.#glanceTarget);
this.#glanceTarget = null;
window.removeEventListener('mousemove', this.mousemoveCallback);
}
this.contentWindow.removeEventListener('mousemove', this.mousemoveCallback);
}
mousemoveCallback() {