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
View File
@@ -40,6 +40,8 @@ _Breaking developer changes, which may affect downstream projects or sites that
#### :newspaper: News
#### :tada: New Features
#### :sparkles: Usability & Accessibility
* Trigger context menu by long-presses of non-mouse inputs (touch or stylus) ([#8105])
#### :white_check_mark: Validation
#### :bug: Bugfixes
* Fix selection of best background source when starting on a zoomed-out view ([#9325])
@@ -49,6 +51,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
#### :hammer: Development
* Synchronize fetching of released presets
[#8105]: https://github.com/openstreetmap/iD/issues/8105
[#9294]: https://github.com/openstreetmap/iD/issues/9294
[#9320]: https://github.com/openstreetmap/iD/pull/9320
[#9325]: https://github.com/openstreetmap/iD/issues/9325
+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,