@@ -69,15 +69,15 @@ describe('ModeBar', function() {
6969 }
7070
7171 function countButtons ( modeBar ) {
72- return d3Select ( modeBar . element ) . selectAll ( 'a.modebar-btn' ) . size ( ) ;
72+ return d3Select ( modeBar . element ) . selectAll ( 'button.modebar-btn, a.modebar-btn' ) . size ( ) ;
7373 }
7474
7575 function countLogo ( modeBar ) {
7676 return d3Select ( modeBar . element ) . selectAll ( 'a.plotlyjsicon' ) . size ( ) ;
7777 }
7878
7979 function checkBtnAttr ( modeBar , index , attr ) {
80- var buttons = d3Select ( modeBar . element ) . selectAll ( 'a.modebar-btn' ) ;
80+ var buttons = d3Select ( modeBar . element ) . selectAll ( 'button.modebar-btn, a.modebar-btn' ) ;
8181 return d3Select ( buttons [ 0 ] [ index ] ) . attr ( attr ) ;
8282 }
8383
@@ -1676,7 +1676,7 @@ describe('ModeBar', function() {
16761676 it ( 'add predefined shape drawing and hover buttons via layout.modebar.add' , function ( done ) {
16771677 function countButtons ( ) {
16781678 var modeBarEl = gd . _fullLayout . _modeBar . element ;
1679- return d3Select ( modeBarEl ) . selectAll ( 'a.modebar-btn' ) . size ( ) ;
1679+ return d3Select ( modeBarEl ) . selectAll ( 'button.modebar-btn, a.modebar-btn' ) . size ( ) ;
16801680 }
16811681
16821682 var initial = 10 ;
@@ -1761,7 +1761,7 @@ describe('ModeBar', function() {
17611761 it ( 'remove buttons using exact (camel case) and short (lower case) names via layout.modebar.remove and template' , function ( done ) {
17621762 function countButtons ( ) {
17631763 var modeBarEl = gd . _fullLayout . _modeBar . element ;
1764- return d3Select ( modeBarEl ) . selectAll ( 'a.modebar-btn' ) . size ( ) ;
1764+ return d3Select ( modeBarEl ) . selectAll ( 'button.modebar-btn, a.modebar-btn' ) . size ( ) ;
17651765 }
17661766
17671767 var initial = 10 ;
@@ -1842,7 +1842,7 @@ describe('ModeBar', function() {
18421842 it ( 'add buttons using template' , function ( done ) {
18431843 function countButtons ( ) {
18441844 var modeBarEl = gd . _fullLayout . _modeBar . element ;
1845- return d3Select ( modeBarEl ) . selectAll ( 'a.modebar-btn' ) . size ( ) ;
1845+ return d3Select ( modeBarEl ) . selectAll ( 'button.modebar-btn, a.modebar-btn' ) . size ( ) ;
18461846 }
18471847
18481848 var initial = 10 ;
@@ -1865,7 +1865,7 @@ describe('ModeBar', function() {
18651865 it ( 'add ' + t + ' button if removed by layout and added by config' , function ( done ) {
18661866 function countButtons ( ) {
18671867 var modeBarEl = gd . _fullLayout . _modeBar . element ;
1868- return d3Select ( modeBarEl ) . selectAll ( 'a.modebar-btn' ) . size ( ) ;
1868+ return d3Select ( modeBarEl ) . selectAll ( 'button.modebar-btn, a.modebar-btn' ) . size ( ) ;
18691869 }
18701870
18711871 var initial = 10 ;
@@ -1886,7 +1886,7 @@ describe('ModeBar', function() {
18861886 it ( 'remove button if added by layout and removed by config' , function ( done ) {
18871887 function countButtons ( ) {
18881888 var modeBarEl = gd . _fullLayout . _modeBar . element ;
1889- return d3Select ( modeBarEl ) . selectAll ( 'a.modebar-btn' ) . size ( ) ;
1889+ return d3Select ( modeBarEl ) . selectAll ( 'button.modebar-btn, a.modebar-btn' ) . size ( ) ;
18901890 }
18911891
18921892 var initial = 10 ;
0 commit comments