diff --git a/modules/behavior/operation.js b/modules/behavior/operation.js index c4aa722a0..cfaf60a22 100644 --- a/modules/behavior/operation.js +++ b/modules/behavior/operation.js @@ -11,25 +11,21 @@ export function behaviorOperation(context) { d3_event.preventDefault(); var disabled = _operation.disabled(); - var flash; if (disabled) { - flash = context.ui().flash + context.ui().flash .duration(4000) .iconName('#iD-operation-' + _operation.id) .iconClass('operation disabled') - .text(_operation.tooltip); - - flash(); + .text(_operation.tooltip)(); } else { - flash = context.ui().flash + context.ui().flash .duration(2000) .iconName('#iD-operation-' + _operation.id) .iconClass('operation') - .text(_operation.annotation() || _operation.title); + .text(_operation.annotation() || _operation.title)(); - flash(); if (_operation.point) _operation.point(null); _operation(); } diff --git a/modules/ui/edit_menu.js b/modules/ui/edit_menu.js index 5bc6aec0b..b55edbbc6 100644 --- a/modules/ui/edit_menu.js +++ b/modules/ui/edit_menu.js @@ -123,6 +123,15 @@ export function uiEditMenu(context) { .text(operation.tooltip)(); } } else { + if (lastPointerUpType === 'touch' || + lastPointerUpType === 'pen') { + context.ui().flash + .duration(2000) + .iconName('#iD-operation-' + operation.id) + .iconClass('operation') + .text(operation.annotation() || operation.title)(); + } + operation(); editMenu.close(); }