mirror of
https://github.com/frappe/books.git
synced 2024-11-08 14:50:56 +00:00
fix: prevent back if editing
- remove duplicate beforeCancel
This commit is contained in:
parent
1a93ab04a5
commit
f95a93860a
@ -951,7 +951,6 @@ export class Doc extends Observable<DocValue | Doc[]> {
|
||||
return;
|
||||
}
|
||||
|
||||
await this.trigger('beforeCancel');
|
||||
await this.trigger('beforeCancel');
|
||||
await this.setAndSync('cancelled', true);
|
||||
await this.trigger('afterCancel');
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user