Don't show hover tooltips for non-mouse pointerenter events (re: #6035)

This commit is contained in:
Quincy Morgan
2020-05-15 12:12:43 -04:00
parent e079e120bf
commit 1f45ad933a
+8 -2
View File
@@ -152,8 +152,14 @@ export function uiPopover(klass) {
var display = _displayType.apply(this, arguments);
if (display === 'hover') {
anchor.on(_pointerPrefix + 'enter.popover', show);
anchor.on(_pointerPrefix + 'leave.popover', hide);
anchor.on(_pointerPrefix + 'enter.popover', function() {
if (d3_event.pointerType && d3_event.pointerType !== 'mouse') return;
show.apply(this, arguments);
});
anchor.on(_pointerPrefix + 'leave.popover', function() {
if (d3_event.pointerType && d3_event.pointerType !== 'mouse') return;
hide.apply(this, arguments);
});
} else if (display === 'clickFocus') {
anchor