Skip to content

Commit 165dffe

Browse files
Remove unnecessary js for the button
1 parent 363a873 commit 165dffe

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/components/modebar/modebar.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,9 @@ proto.createButton = function(config) {
149149
var button = document.createElement('button');
150150

151151
button.setAttribute('type', 'button');
152-
button.setAttribute('tabindex', '0');
153152
button.setAttribute('rel', 'tooltip');
154153
button.className = 'modebar-btn';
155-
154+
156155
var title = config.title;
157156
if(title === undefined) title = config.name;
158157
// for localization: allow title to be a callable that takes gd as arg
@@ -181,15 +180,6 @@ proto.createButton = function(config) {
181180
// only needed for 'hoverClosestGeo' which does not call relayout
182181
_this.updateActiveButton(ev.currentTarget);
183182
});
184-
button.addEventListener('keydown', function(e) {
185-
if (e.key === 'Enter' || e.key === ' ') {
186-
const activeButton = e.target.closest('.modebar-btn');
187-
if (activeButton) {
188-
activeButton.click();
189-
e.preventDefault();
190-
}
191-
}
192-
});
193183
}
194184

195185
button.setAttribute('data-toggle', config.toggle || false);

0 commit comments

Comments
 (0)