B2G/gecko/browser/components/tabview/ui.js
// Called when a web page is about to show a modal dialog.
Called when a web page is about to show a modal dialog.
Called when a web page is about to show a modal dialog .
function UI__onDOMWillOpenModalDialog(cx) {
    if (!this.isTabViewVisible())
      return;
    let index = gBrowser.browsers.indexOf(cx.target);
    if (index == -1)
      return;
    let tab = gBrowser.tabs[index];
    if (gBrowser.selectedTab == tab && this._currentTab == tab)
      this.onTabSelect(tab);
  }
function UI__onDOMWillOpenModalDialog ( cx ) { if ( ! this . isTabViewVisible ( ) ) return ; let index = gBrowser . browsers . indexOf ( cx . target ) ; if ( index == - 1 ) return ; let tab = gBrowser . tabs [ index ] ; if ( gBrowser . selectedTab == tab && this . _currentTab == tab ) this . onTabSelect ( tab ) ; }
Called when a web page is about to show a modal dialog.
Called when a web page is about to show a modal dialog .
// When TabView is visible, we need to call onTabSelect to make sure that // TabView is hidden and that the correct group is activated. When a modal // dialog is shown for currently selected tab the onTabSelect event handler // is not called, so we need to do it.