@@ -897,7 +897,9 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
897
897
tabCount : window . gBrowser . selectedTabs . length ,
898
898
} ) ;
899
899
document . getElementById ( 'context_zenSplitTabs' ) . setAttribute ( 'data-l10n-args' , tabCountInfo ) ;
900
- document . getElementById ( 'context_zenSplitTabs' ) . disabled = ! this . contextCanSplitTabs ( ) ;
900
+ document
901
+ . getElementById ( 'context_zenSplitTabs' )
902
+ . setAttribute ( 'disabled' , ! this . contextCanSplitTabs ( ) ) ;
901
903
} ) ;
902
904
}
903
905
@@ -951,7 +953,7 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
951
953
window . gContextMenu . target . ownerDocument . location . href ;
952
954
const currentTab = gZenGlanceManager . getTabOrGlanceParent ( window . gBrowser . selectedTab ) ;
953
955
const newTab = this . openAndSwitchToTab ( url , { inBackground : false } ) ;
954
- this . splitTabs ( [ currentTab , newTab ] , 'grid' , 1 ) ;
956
+ this . splitTabs ( [ currentTab , newTab ] , undefined , 1 ) ;
955
957
}
956
958
957
959
/**
@@ -1028,7 +1030,7 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
1028
1030
* Splits the given tabs.
1029
1031
*
1030
1032
* @param {Tab[] } tabs - The tabs to split.
1031
- * @param {string } gridType - The type of grid layout.
1033
+ * @param {string|undefined } gridType - The type of grid layout.
1032
1034
*/
1033
1035
splitTabs ( tabs , gridType , initialIndex = 0 ) {
1034
1036
// TODO: Add support for splitting essential tabs
@@ -1874,9 +1876,11 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
1874
1876
}
1875
1877
1876
1878
maybeDisableOpeningTabOnSplitView ( ) {
1879
+ const shouldBeDisabled = ! this . canOpenLinkInSplitView ( ) ;
1877
1880
document
1878
1881
. getElementById ( 'cmd_zenSplitViewLinkInNewTab' )
1879
- . setAttribute ( 'disabled' , ! this . canOpenLinkInSplitView ( ) ) ;
1882
+ . setAttribute ( 'disabled' , shouldBeDisabled ) ;
1883
+ document . getElementById ( 'zen-glance-sidebar-split' ) . setAttribute ( 'disabled' , shouldBeDisabled ) ;
1880
1884
}
1881
1885
1882
1886
canOpenLinkInSplitView ( ) {
0 commit comments