Bug 775336: mark the social sidebar browser as an app tab, so that untargeted links get opened in new tabs, r=gavin
authorShane Caraveo <mixedpuppy@gmail.com>
Wed, 25 Jul 2012 16:27:20 -0700
changeset 100558 98c2a42a3aefb716b570b5e6b746f09e442e3a87
parent 100557 677cdab1da6a1e6a8bcb1c56d2f65b10022c0575
child 100559 9919f35f551478b29eb18d5260d1f7db5570c31a
push id23183
push usergsharp@mozilla.com
push dateThu, 26 Jul 2012 16:17:10 +0000
treeherdermozilla-central@98c2a42a3aef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin
bugs775336
milestone17.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 775336: mark the social sidebar browser as an app tab, so that untargeted links get opened in new tabs, r=gavin
browser/base/content/browser-social.js
--- a/browser/base/content/browser-social.js
+++ b/browser/base/content/browser-social.js
@@ -373,16 +373,20 @@ var SocialToolbar = {
     this.button.setAttribute("open", "true");
     panel.openPopup(iconImage, "bottomcenter topleft", 0, 0, false, false);
   }
 }
 
 var SocialSidebar = {
   // Called once, after window load, when the Social.provider object is initialized
   init: function SocialSidebar_init() {
+    let sbrowser = document.getElementById("social-sidebar-browser");
+    // setting isAppTab causes clicks on untargeted links to open new tabs
+    sbrowser.docShell.isAppTab = true;
+  
     this.updateSidebar();
   },
 
   // Whether the sidebar can be shown for this window.
   get canShow() {
     return Social.uiVisible && Social.provider.sidebarURL && !this.chromeless;
   },