diff --git a/packages/bruno-app/src/components/MultiLineEditor/index.js b/packages/bruno-app/src/components/MultiLineEditor/index.js index 25f1cf52f..11050c5c0 100644 --- a/packages/bruno-app/src/components/MultiLineEditor/index.js +++ b/packages/bruno-app/src/components/MultiLineEditor/index.js @@ -164,6 +164,10 @@ class MultiLineEditor extends Component { this.cachedValue = nextValue; this.editor.setValue(nextValue); this.editor.setCursor(cursor); + // Re-apply masking after setValue() since it destroys all CodeMirror marks + if (this.maskedEditor && this.maskedEditor.isEnabled()) { + this.maskedEditor.update(); + } } } if (!isEqual(this.props.isSecret, prevProps.isSecret)) { diff --git a/packages/bruno-app/src/components/SingleLineEditor/index.js b/packages/bruno-app/src/components/SingleLineEditor/index.js index ae8e89551..8f2aae9e5 100644 --- a/packages/bruno-app/src/components/SingleLineEditor/index.js +++ b/packages/bruno-app/src/components/SingleLineEditor/index.js @@ -179,6 +179,10 @@ class SingleLineEditor extends Component { this.cachedValue = nextValue; this.editor.setValue(nextValue); this.editor.setCursor(cursor); + // Re-apply masking after setValue() since it destroys all CodeMirror marks + if (this.maskedEditor && this.maskedEditor.isEnabled()) { + this.maskedEditor.update(); + } // Update newline markers after value change if (this.props.showNewlineArrow) {