@@ -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
@@ -1620,7 +1620,7 @@ describe('ModeBar', function() {
16201620 it ( 'add predefined shape drawing and hover buttons via layout.modebar.add' , function ( done ) {
16211621 function countButtons ( ) {
16221622 var modeBarEl = gd . _fullLayout . _modeBar . element ;
1623- return d3Select ( modeBarEl ) . selectAll ( 'a.modebar-btn' ) . size ( ) ;
1623+ return d3Select ( modeBarEl ) . selectAll ( 'button.modebar-btn, a.modebar-btn' ) . size ( ) ;
16241624 }
16251625
16261626 var initial = 10 ;
@@ -1705,7 +1705,7 @@ describe('ModeBar', function() {
17051705 it ( 'remove buttons using exact (camel case) and short (lower case) names via layout.modebar.remove and template' , function ( done ) {
17061706 function countButtons ( ) {
17071707 var modeBarEl = gd . _fullLayout . _modeBar . element ;
1708- return d3Select ( modeBarEl ) . selectAll ( 'a.modebar-btn' ) . size ( ) ;
1708+ return d3Select ( modeBarEl ) . selectAll ( 'button.modebar-btn, a.modebar-btn' ) . size ( ) ;
17091709 }
17101710
17111711 var initial = 10 ;
@@ -1786,7 +1786,7 @@ describe('ModeBar', function() {
17861786 it ( 'add buttons using template' , function ( done ) {
17871787 function countButtons ( ) {
17881788 var modeBarEl = gd . _fullLayout . _modeBar . element ;
1789- return d3Select ( modeBarEl ) . selectAll ( 'a.modebar-btn' ) . size ( ) ;
1789+ return d3Select ( modeBarEl ) . selectAll ( 'button.modebar-btn, a.modebar-btn' ) . size ( ) ;
17901790 }
17911791
17921792 var initial = 10 ;
@@ -1809,7 +1809,7 @@ describe('ModeBar', function() {
18091809 it ( 'add ' + t + ' button if removed by layout and added by config' , function ( done ) {
18101810 function countButtons ( ) {
18111811 var modeBarEl = gd . _fullLayout . _modeBar . element ;
1812- return d3Select ( modeBarEl ) . selectAll ( 'a.modebar-btn' ) . size ( ) ;
1812+ return d3Select ( modeBarEl ) . selectAll ( 'button.modebar-btn, a.modebar-btn' ) . size ( ) ;
18131813 }
18141814
18151815 var initial = 10 ;
@@ -1830,7 +1830,7 @@ describe('ModeBar', function() {
18301830 it ( 'remove button if added by layout and removed by config' , function ( done ) {
18311831 function countButtons ( ) {
18321832 var modeBarEl = gd . _fullLayout . _modeBar . element ;
1833- return d3Select ( modeBarEl ) . selectAll ( 'a.modebar-btn' ) . size ( ) ;
1833+ return d3Select ( modeBarEl ) . selectAll ( 'button.modebar-btn, a.modebar-btn' ) . size ( ) ;
18341834 }
18351835
18361836 var initial = 10 ;
0 commit comments