mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-26 14:15:52 +00:00
Prevent cursor state loss on empty nextValue (#7180)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user