Fix autocomplete issues caused by stopping 'change' propagation
Only stop propagation when the window is inactive, and don't fire the
synthetic event on blur. Does the same thing as efd7ec6
was intended to
do, but in a less heavy-handed way.
Fixes #3734
This commit is contained in:
parent
efd7ec6dc2
commit
93536a1592
1 changed files with 3 additions and 4 deletions
|
@ -191,7 +191,9 @@
|
|||
this.setAttribute('value', this._input.value);
|
||||
};
|
||||
let handleChange = (event) => {
|
||||
event.stopPropagation();
|
||||
if (Services.focus.activeWindow !== window) {
|
||||
event.stopPropagation();
|
||||
}
|
||||
this.setAttribute('value', this._input.value);
|
||||
};
|
||||
input.addEventListener('mousedown', () => {
|
||||
|
@ -224,9 +226,6 @@
|
|||
this._ignoredWindowInactiveBlur = false;
|
||||
|
||||
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…
Add table
Reference in a new issue