From be208be7049e665c25f30627a3c966aae95b6b3c Mon Sep 17 00:00:00 2001 From: Quincy Morgan <2046746+quincylvania@users.noreply.github.com> Date: Thu, 1 Oct 2020 12:12:46 -0400 Subject: [PATCH] Show tooltips on focus as well as hover (re: #8004) --- modules/ui/popover.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/ui/popover.js b/modules/ui/popover.js index 42ee586ee..a6174b687 100644 --- a/modules/ui/popover.js +++ b/modules/ui/popover.js @@ -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); });