Comment 18 for bug 481541

Revision history for this message
In , Danm-moz (danm-moz) wrote :

(From update of attachment 160898)
*Always* in the foreground? Despite opinions to the contrary using strong words
like "broken" and "useless," Bradley and I don't want tabs to *always* load in
the foreground. And we get to win. As long as he agrees with me :). I'm r-ing
this patch.

I'm unswayed by Grandmother Arguments about the undiscoverability of tabs
loading in the background, because the user has to explicitly set them up to
load in the background. The default is for new tabs to gain focus.

However I agree with Richard (comment 5) the pref that should control the
current situation is more akin to the one controlling whether bookmarks/history
tabs automatically gain focus. It's questionable whether we'll want to add yet
another pref to the dialog. Certainly not during the current localization
freeze.

But it's not so simple. This is generic back-end code with few clues about how
it's being used. Beginning with tomorrow's nightly builds (and hopefully from
then on) this code also affects the treatment of tabs opened when
javascript:window.open is diverted into a tab. I think we can all agree that
popup windows opened on a timer (from an allowed popup site, presumably) would
behave under the sway of the generic "load in background" pref, as the code
currently stands.

The best practical solution, still imperfect, would seem to be to use the pref
controlling bookmarks/history tabs for the two present usages, and use the pref
controlling generic windows for javascript:window.open. The distinction could
be made by using in the window.open case an as-yet undefined third Context
const in the third parameter to openURI.