1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -147,8 +147,8 @@ var gZenUIManager = {
147
147
this . __currentPopupTrackElement = null ;
148
148
} ,
149
149
150
- get newtabButton ( ) {
151
- return ZenWorkspaces . activeWorkspaceStrip . querySelector ( '#tabs-newtab-button' ) ;
150
+ get newtabButtons ( ) {
151
+ return document . querySelectorAll ( '#tabs-newtab-button' ) ;
152
152
} ,
153
153
154
154
_prevUrlbarLabel : null ,
@@ -168,7 +168,9 @@ var gZenUIManager = {
168
168
this . _prevUrlbarLabel = gURLBar . _untrimmedValue ;
169
169
gURLBar . _zenHandleUrlbarClose = this . handleUrlbarClose . bind ( this ) ;
170
170
gURLBar . setAttribute ( 'zen-newtab' , true ) ;
171
- this . newtabButton . setAttribute ( 'in-urlbar' , true ) ;
171
+ for ( const button of this . newtabButtons ) {
172
+ button . setAttribute ( 'in-urlbar' , true ) ;
173
+ }
172
174
document . getElementById ( 'Browser:OpenLocation' ) . doCommand ( ) ;
173
175
gURLBar . search ( this . _lastSearch ) ;
174
176
return true ;
@@ -186,7 +188,9 @@ var gZenUIManager = {
186
188
gURLBar . removeAttribute ( 'zen-newtab' ) ;
187
189
this . _lastTab . _visuallySelected = true ;
188
190
this . _lastTab = null ;
189
- this . newtabButton . removeAttribute ( 'in-urlbar' ) ;
191
+ for ( const button of this . newtabButtons ) {
192
+ button . removeAttribute ( 'in-urlbar' ) ;
193
+ }
190
194
if ( onSwitch ) {
191
195
this . clearUrlbarData ( ) ;
192
196
} else {
0 commit comments