From d060544da6349f57b70b9e749b3bc5d4e0eabfb6 Mon Sep 17 00:00:00 2001 From: Mickael V <4669258+K3UL@users.noreply.github.com> Date: Thu, 19 Feb 2026 12:53:05 +0100 Subject: [PATCH] Prevent cursor state loss on empty nextValue (#7180) --- packages/bruno-app/src/components/SingleLineEditor/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bruno-app/src/components/SingleLineEditor/index.js b/packages/bruno-app/src/components/SingleLineEditor/index.js index 37678c0fe..ae8e89551 100644 --- a/packages/bruno-app/src/components/SingleLineEditor/index.js +++ b/packages/bruno-app/src/components/SingleLineEditor/index.js @@ -172,7 +172,7 @@ class SingleLineEditor extends Component { // TODO: temporary fix for keeping cursor state when auto save and new line insertion collide PR#7098 const nextValue = String(this.props.value ?? ''); const currentValue = this.editor.getValue(); - if (this.editor.hasFocus?.() && currentValue !== nextValue) { + if (this.editor.hasFocus?.() && currentValue !== nextValue && nextValue !== '') { this.cachedValue = currentValue; } else { const cursor = this.editor.getCursor();