mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1403965
fix context menu position in extension sidebar, r=kmag
MozReview-Commit-ID: 37XgWflt2qG --HG-- extra : rebase_source : 224eb8ad1f1f12b1598cbad48536fab51e26648d
This commit is contained in:
parent
a07765b336
commit
be53524747
@ -189,6 +189,11 @@ var SidebarUI = {
|
||||
}
|
||||
|
||||
this.hideSwitcherPanel();
|
||||
|
||||
let content = SidebarUI.browser.contentWindow;
|
||||
if (content && content.updatePosition) {
|
||||
content.updatePosition();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -93,6 +93,17 @@ var gBrowser = {
|
||||
},
|
||||
};
|
||||
|
||||
function updatePosition() {
|
||||
// We need both of these to make sure we update the position
|
||||
// after any lower level updates have finished.
|
||||
requestAnimationFrame(() => setTimeout(() => {
|
||||
let browser = document.getElementById("webext-panels-browser");
|
||||
if (browser && browser.isRemoteBrowser) {
|
||||
browser.frameLoader.requestUpdatePosition();
|
||||
}
|
||||
}, 0));
|
||||
}
|
||||
|
||||
function loadPanel(extensionId, extensionUrl, browserStyle) {
|
||||
let browserEl = document.getElementById("webext-panels-browser");
|
||||
if (browserEl) {
|
||||
|
Loading…
Reference in New Issue
Block a user