editable-text: Don't put 'null'/'undefined' in the field
In case something deleted dataset.initialValue after focus and before we received this keypress. Addresses #3725. Might still want to rework that listener, but this change made sense regardless, since the same kind of race condition could be triggered elsewhere.
This commit is contained in:
parent
07296b4506
commit
b15fb36f1b
1 changed files with 1 additions and 1 deletions
|
@ -239,7 +239,7 @@
|
|||
}
|
||||
else if (event.key === 'Escape') {
|
||||
this.dispatchEvent(new CustomEvent('escape_enter'));
|
||||
let initialValue = this._input.dataset.initialValue;
|
||||
let initialValue = this._input.dataset.initialValue ?? '';
|
||||
this.setAttribute('value', initialValue);
|
||||
this._input.value = initialValue;
|
||||
this._input.blur();
|
||||
|
|
Loading…
Reference in a new issue