diff --git a/ts/item_command.ts b/ts/item_command.ts index ab1804b..005809c 100644 --- a/ts/item_command.ts +++ b/ts/item_command.ts @@ -66,6 +66,24 @@ export class Command extends AbstractItem { super(menu, 'command', content, id); } + /** + * @param {MouseEvent} event The mousedown event + */ + public mousedown(event: MouseEvent) { + this.stop(event); + } + + /** + * Perform press on mouseup so menu gets the mouse up rather than a dialog box + * after the menu closes. + * + * @param {MouseEvent} event The mouseup event + */ + public mouseup(event: MouseEvent) { + this.press(); + this.stop(event); + } + /** * @override */