From f3a43c808330d0a0118ddbc9f10775fe3445052f Mon Sep 17 00:00:00 2001 From: Lykin <137850705+tiny-craft@users.noreply.github.com> Date: Thu, 25 Jan 2024 15:34:43 +0800 Subject: [PATCH] fix: block ctrl key combinations input in cli --- frontend/src/components/content_value/ContentCli.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/content_value/ContentCli.vue b/frontend/src/components/content_value/ContentCli.vue index d2d85db..55fe7d7 100644 --- a/frontend/src/components/content_value/ContentCli.vue +++ b/frontend/src/components/content_value/ContentCli.vue @@ -206,7 +206,7 @@ const onTermKey = (e) => { return false case 'e': // move to tail of line - moveInputCursorTo(Number.MAX_VALUE) + moveInputCursorTo(Number.MAX_SAFE_INTEGER) return false case 'f': // move forward @@ -251,6 +251,8 @@ const onTermKey = (e) => { newInputLine() return false } + // block all ctrl key combinations input + return false } } return true @@ -290,7 +292,7 @@ const moveInputCursor = (step) => { * move cursor to the end of current line */ const moveInputCursorToEnd = () => { - moveInputCursorTo(Number.MAX_VALUE) + moveInputCursorTo(Number.MAX_SAFE_INTEGER) } /**