mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-21 17:59:34 +00:00
Bug 499547, double click on bookmark in library not raising window, r=dao
This commit is contained in:
parent
fc5a81de1e
commit
5e4fafdf7a
@ -242,17 +242,25 @@ function openUILinkIn( url, where, allowThirdPartyFixup, postData, referrerUrl )
|
||||
loadInBackground = !loadInBackground;
|
||||
// fall through
|
||||
case "tab":
|
||||
var browser = w.getBrowser();
|
||||
let browser = w.getBrowser();
|
||||
browser.loadOneTab(url, referrerUrl, null, postData, loadInBackground,
|
||||
allowThirdPartyFixup || false);
|
||||
break;
|
||||
}
|
||||
|
||||
// Focus the content but don't raise the window, since the URI we just loaded
|
||||
// may have resulted in a new frontmost window (e.g. "javascript:window.open('');").
|
||||
var browser = w.getBrowserFromContentWindow(w.content);
|
||||
if (browser)
|
||||
browser.focus();
|
||||
// If this window is active, focus the target window. Otherwise, focus the
|
||||
// content but don't raise the window, since the URI we just loaded may have
|
||||
// resulted in a new frontmost window (e.g. "javascript:window.open('');").
|
||||
var fm = Components.classes["@mozilla.org/focus-manager;1"].
|
||||
getService(Components.interfaces.nsIFocusManager);
|
||||
if (window == fm.activeWindow) {
|
||||
w.content.focus();
|
||||
}
|
||||
else {
|
||||
let browser = w.getBrowserFromContentWindow(w.content);
|
||||
if (browser)
|
||||
browser.focus();
|
||||
}
|
||||
}
|
||||
|
||||
// Used as an onclick handler for UI elements with link-like behavior.
|
||||
|
@ -84,6 +84,10 @@ var gTabsListener = {
|
||||
if (gCurrentTest.URIs.indexOf(spec) != -1 )
|
||||
this._loadedURIs.push(spec);
|
||||
|
||||
var fm = Components.classes["@mozilla.org/focus-manager;1"].
|
||||
getService(Components.interfaces.nsIFocusManager);
|
||||
is(fm.activeWindow, gBrowser.ownerDocument.defaultView, "window made active");
|
||||
|
||||
if (this._loadedURIs.length == gCurrentTest.URIs.length) {
|
||||
// We have correctly opened all URIs.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user