mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
Don't show hover tooltips for non-mouse pointerenter events (re: #6035)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user