mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 626148 - Opening link in new tab from background window opens tab in foreground window; r,a=dolske
This commit is contained in:
parent
561113cc04
commit
2d211b3105
@ -51,6 +51,13 @@ function getBrowserURL()
|
||||
}
|
||||
|
||||
function getTopWin(skipPopups) {
|
||||
// If this is called in a browser window, use that window regardless of
|
||||
// whether it's the frontmost window, since commands can be executed in
|
||||
// background windows (bug 626148).
|
||||
if (top.document.documentElement.getAttribute("windowtype") == "navigator:browser" &&
|
||||
(!skipPopups || !top.document.documentElement.getAttribute("chromehidden")))
|
||||
return top;
|
||||
|
||||
if (skipPopups) {
|
||||
return Components.classes["@mozilla.org/browser/browserglue;1"]
|
||||
.getService(Components.interfaces.nsIBrowserGlue)
|
||||
|
Loading…
Reference in New Issue
Block a user