Center glance tab opening position in the browser

This commit is contained in:
mr. M
2025-02-26 22:06:36 +01:00
parent 71dde4d0dd
commit 65d56afc02

View File

@@ -481,7 +481,8 @@
}
try {
if (this.shouldOpenTabInGlance(tab, uri)) {
this.openGlance({ url: undefined, x: 0, y: 0, width: 0, height: 0 }, tab, tab.owner);
const browserRect = gBrowser.tabbox.getBoundingClientRect();
this.openGlance({ url: undefined, x: browserRect.width / 2, y: browserRect.height / 2, width: 0, height: 0 });
}
} catch (e) {
console.error(e);