8000 David/enhancement modebar by davidangarita1 · Pull Request #7429 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

David/enhancement modebar #7429

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove unnecessary js for the button
  • Loading branch information
davidangarita1 committed Jun 4, 2025
commit 165dffe79a6a0daf7d9c8af727f682de4b6982ca
12 changes: 1 addition & 11 deletions src/components/modebar/modebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,9 @@ proto.createButton = function(config) {
var button = document.createElement('button');

button.setAttribute('type', 'button');
button.setAttribute('tabindex', '0');
button.setAttribute('rel', 'tooltip');
button.className = 'modebar-btn';

var title = config.title;
if(title === undefined) title = config.name;
// for localization: allow title to be a callable that takes gd as arg
Expand Down Expand Up @@ -181,15 +180,6 @@ proto.createButton = function(config) {
// only needed for 'hoverClosestGeo' which does not call relayout
_this.updateActiveButton(ev.currentTarget);
});
button.addEventListener('keydown', function(e) {
if (e.key === 'Enter' || e.key === ' ') {
const activeButton = e.target.closest('.modebar-btn');
if (activeButton) {
activeButton.click();
e.preventDefault();
}
}
});
}

button.setAttribute('data-toggle', config.toggle || false);
Expand Down
0