mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 21:28:11 +02:00
Fix responsiveness issue when selecting features on iPad
Implement an alternative solution for #6028 that doesn't rely on timeouts
This commit is contained in:
@@ -109,17 +109,10 @@ export function behaviorSelect(context) {
|
||||
_p1 = null;
|
||||
if (dist > tolerance) return;
|
||||
|
||||
// Defer processing the click,
|
||||
// because this click may trigger a blur event,
|
||||
// and the blur event may trigger a tag change,
|
||||
// and we really want that tag change to go to the already selected entity
|
||||
// and not the one that we are about to select with the click #6028, #5878
|
||||
// (Be very careful entering modeSelect anywhere that might also blur a field!)
|
||||
var datum = d3_event.target.__data__ || (_lastMouse && _lastMouse.target.__data__);
|
||||
var isMultiselect = d3_event.shiftKey || d3_select('#surface .lasso').node();
|
||||
window.setTimeout(function() {
|
||||
processClick(datum, isMultiselect);
|
||||
}, 20); // delay > whatever raw_tag_editor.js `scheduleChange` does (10ms).
|
||||
|
||||
processClick(datum, isMultiselect);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user