Skip to content

Commit

Permalink
Show tooltips on focus as well as hover (re: #8004)
Browse files Browse the repository at this point in the history
  • Loading branch information
quincylvania committed Oct 1, 2020
1 parent 118a91e commit be208be
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions modules/ui/popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,15 @@ export function uiPopover(klass) {
if (d3_event.buttons !== 0) return;

show.apply(this, arguments);
});
anchor.on(_pointerPrefix + 'leave.popover', function() {
})
.on(_pointerPrefix + 'leave.popover', function() {
hide.apply(this, arguments);
})
// show on focus too for better keyboard navigation support
.on('focus.popover', function() {
show.apply(this, arguments);
})
.on('blur.popover', function() {
hide.apply(this, arguments);
});

Expand Down

0 comments on commit be208be

Please sign in to comment.