Fix title/abstract saving when window becomes inactive
We weren't stopping 'change' from propagating upwards when the change hadn't actually been committed yet, and the pane-header and abstract-box CEs listen to that event instead of 'blur'.
This commit is contained in:
parent
26fd57398c
commit
efd7ec6dc2
1 changed files with 6 additions and 2 deletions
|
@ -190,7 +190,8 @@
|
|||
}
|
||||
this.setAttribute('value', this._input.value);
|
||||
};
|
||||
let handleChange = () => {
|
||||
let handleChange = (event) => {
|
||||
event.stopPropagation();
|
||||
this.setAttribute('value', this._input.value);
|
||||
};
|
||||
input.addEventListener('mousedown', () => {
|
||||
|
@ -222,7 +223,10 @@
|
|||
}
|
||||
this._ignoredWindowInactiveBlur = false;
|
||||
|
||||
this.dispatchEvent(new CustomEvent('blur'));
|
||||
this.dispatchEvent(new Event('blur'));
|
||||
if (this.value !== this._input.dataset.initialValue) {
|
||||
this.dispatchEvent(new Event('change'));
|
||||
}
|
||||
this.classList.remove("focused");
|
||||
this._input.scrollLeft = 0;
|
||||
this._input.setSelectionRange(0, 0);
|
||||
|
|
Loading…
Reference in a new issue