@@ -69,15 +69,15 @@ describe('ModeBar', function() {
69
69
}
70
70
71
71
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 ( ) ;
73
73
}
74
74
75
75
function countLogo ( modeBar ) {
76
76
return d3Select ( modeBar . element ) . selectAll ( 'a.plotlyjsicon' ) . size ( ) ;
77
77
}
78
78
79
79
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' ) ;
81
81
return d3Select ( buttons [ 0 ] [ index ] ) . attr ( attr ) ;
82
82
}
83
83
@@ -1620,7 +1620,7 @@ describe('ModeBar', function() {
1620
1620
it ( 'add predefined shape drawing and hover buttons via layout.modebar.add' , function ( done ) {
1621
1621
function countButtons ( ) {
1622
1622
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 ( ) ;
1624
1624
}
1625
1625
1626
1626
var initial = 10 ;
@@ -1705,7 +1705,7 @@ describe('ModeBar', function() {
1705
1705
it ( 'remove buttons using exact (camel case) and short (lower case) names via layout.modebar.remove and template' , function ( done ) {
1706
1706
function countButtons ( ) {
1707
1707
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 ( ) ;
1709
1709
}
1710
1710
1711
1711
var initial = 10 ;
@@ -1786,7 +1786,7 @@ describe('ModeBar', function() {
1786
1786
it ( 'add buttons using template' , function ( done ) {
1787
1787
function countButtons ( ) {
1788
1788
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 ( ) ;
1790
1790
}
1791
1791
1792
1792
var initial = 10 ;
@@ -1809,7 +1809,7 @@ describe('ModeBar', function() {
1809
1809
it ( 'add ' + t + ' button if removed by layout and added by config' , function ( done ) {
1810
1810
function countButtons ( ) {
1811
1811
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 ( ) ;
1813
1813
}
1814
1814
1815
1815
var initial = 10 ;
@@ -1830,7 +1830,7 @@ describe('ModeBar', function() {
1830
1830
it ( 'remove button if added by layout and removed by config' , function ( done ) {
1831
1831
function countButtons ( ) {
1832
1832
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 ( ) ;
1834
1834
}
1835
1835
1836
1836
var initial = 10 ;
0 commit comments