only use long-press context menu behavior on touch/stylus inputs

closes #8105
This commit is contained in:
Martin Raifer
2022-10-14 12:56:54 +02:00
parent 8076f6f2fe
commit e8ceba1107
2 changed files with 6 additions and 1 deletions
+3 -1
View File
@@ -97,7 +97,9 @@ export function behaviorSelect(context) {
context.ui().closeEditMenu();
_longPressTimeout = window.setTimeout(didLongPress, 500, id, 'longdown-' + (d3_event.pointerType || 'mouse'));
if (d3_event.pointerType !== 'mouse') {
_longPressTimeout = window.setTimeout(didLongPress, 500, id, 'longdown-' + (d3_event.pointerType || 'mouse'));
}
_downPointers[id] = {
firstEvent: d3_event,