diff --git a/src/packages/frontend/client/api.ts b/src/packages/frontend/client/api.ts index 91a30728cb..3ede25deff 100644 --- a/src/packages/frontend/client/api.ts +++ b/src/packages/frontend/client/api.ts @@ -67,7 +67,6 @@ async function callApi( await delay(RETRY_DELAY_MS); return await callApi(endpoint, args, numRetriesOnFail - 1); } - console.log("json = ", json); if (json == null) { throw Error("timeout -- try again later"); } diff --git a/src/packages/frontend/editors/task-editor/actions.ts b/src/packages/frontend/editors/task-editor/actions.ts index 06654847da..df931476b1 100644 --- a/src/packages/frontend/editors/task-editor/actions.ts +++ b/src/packages/frontend/editors/task-editor/actions.ts @@ -533,6 +533,14 @@ export class TaskActions extends Actions { this.set_local_task_state(task_id, { editing_desc: false }); } + isEditing = () => { + const task_id = this.getFrameData("current_task_id"); + return !!this.getFrameData("local_task_state")?.getIn([ + task_id, + "editing_desc", + ]); + }; + // null=unselect all. public edit_desc(task_id: string | undefined | null): void { // close any that were currently in edit state before opening new one diff --git a/src/packages/frontend/editors/task-editor/keyboard.ts b/src/packages/frontend/editors/task-editor/keyboard.ts index ab47b5b8c5..432bccf136 100644 --- a/src/packages/frontend/editors/task-editor/keyboard.ts +++ b/src/packages/frontend/editors/task-editor/keyboard.ts @@ -18,7 +18,10 @@ function is_sortable(actions): boolean { } export function create_key_handler(actions): (any) => void { - return function (evt) { + return (evt) => { + if (actions.isEditing()) { + return; + } const read_only = !!actions.store.get("read_only"); const mod = evt.ctrlKey || evt.metaKey || evt.altKey || evt.shiftKey;