@@ -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
@@ -1676,7 +1676,7 @@ describe('ModeBar', function() {
1676
1676
it ( 'add predefined shape drawing and hover buttons via layout.modebar.add' , function ( done ) {
1677
1677
function countButtons ( ) {
1678
1678
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 ( ) ;
1680
1680
}
1681
1681
1682
1682
var initial = 10 ;
@@ -1761,7 +1761,7 @@ describe('ModeBar', function() {
1761
1761
it ( 'remove buttons using exact (camel case) and short (lower case) names via layout.modebar.remove and template' , function ( done ) {
1762
1762
function countButtons ( ) {
1763
1763
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 ( ) ;
1765
1765
}
1766
1766
1767
1767
var initial = 10 ;
@@ -1842,7 +1842,7 @@ describe('ModeBar', function() {
1842
1842
it ( 'add buttons using template' , function ( done ) {
1843
1843
function countButtons ( ) {
1844
1844
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 ( ) ;
1846
1846
}
1847
1847
1848
1848
var initial = 10 ;
@@ -1865,7 +1865,7 @@ describe('ModeBar', function() {
1865
1865
it ( 'add ' + t + ' button if removed by layout and added by config' , function ( done ) {
1866
1866
function countButtons ( ) {
1867
1867
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 ( ) ;
1869
1869
}
1870
1870
1871
1871
var initial = 10 ;
@@ -1886,7 +1886,7 @@ describe('ModeBar', function() {
1886
1886
it ( 'remove button if added by layout and removed by config' , function ( done ) {
1887
1887
function countButtons ( ) {
1888
1888
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 ( ) ;
1890
1890
}
1891
1891
1892
1892
var initial = 10 ;
0 commit comments