diff --git a/fyo/model/doc.ts b/fyo/model/doc.ts index 605194f5..a5b23b6d 100644 --- a/fyo/model/doc.ts +++ b/fyo/model/doc.ts @@ -951,7 +951,6 @@ export class Doc extends Observable { return; } - await this.trigger('beforeCancel'); await this.trigger('beforeCancel'); await this.setAndSync('cancelled', true); await this.trigger('afterCancel'); diff --git a/src/utils/vueUtils.ts b/src/utils/vueUtils.ts index 9f46ae23..8458f173 100644 --- a/src/utils/vueUtils.ts +++ b/src/utils/vueUtils.ts @@ -31,9 +31,15 @@ export function useKeys() { }); const keydownListener = (e: KeyboardEvent) => { + const notMods = !(e.altKey || e.metaKey || e.ctrlKey); + if (e.target instanceof HTMLInputElement && notMods) { + return; + } + if ( - e.target instanceof HTMLInputElement && - !(e.altKey || e.metaKey || e.ctrlKey) + e.target instanceof HTMLElement && + e.target.contentEditable === 'true' && + notMods ) { return; }