fix tagsbox enter glitch (#4160)
The 'blur' event needs to be dispatched by editable-text
before its state is reset (not after) because tagsbox uses
.initialValue in the 'blur' handler.
followup to 101e6d55d5
Fixes: #3575
This commit is contained in:
parent
721f54fe49
commit
9325f773cc
2 changed files with 2 additions and 2 deletions
|
@ -324,8 +324,8 @@
|
||||||
this._ignoredWindowInactiveBlur = true;
|
this._ignoredWindowInactiveBlur = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this._resetStateAfterBlur();
|
|
||||||
this.dispatchEvent(new Event('blur'));
|
this.dispatchEvent(new Event('blur'));
|
||||||
|
this._resetStateAfterBlur();
|
||||||
};
|
};
|
||||||
|
|
||||||
_resetStateAfterBlur() {
|
_resetStateAfterBlur() {
|
||||||
|
|
|
@ -16,7 +16,7 @@ describe("Item Tags Box", function () {
|
||||||
|
|
||||||
|
|
||||||
describe("Tag Editing", function () {
|
describe("Tag Editing", function () {
|
||||||
it.skip("should update tag when pressing Enter in textbox", async function () {
|
it("should update tag when pressing Enter in textbox", async function () {
|
||||||
if (!doc.hasFocus()) {
|
if (!doc.hasFocus()) {
|
||||||
// editable-text behavior relies on focus, so we first need to bring the window to the front.
|
// editable-text behavior relies on focus, so we first need to bring the window to the front.
|
||||||
// Not required on all platforms. In some cases (e.g. Linux), the window is at the front from the start.
|
// Not required on all platforms. In some cases (e.g. Linux), the window is at the front from the start.
|
||||||
|
|
Loading…
Reference in a new issue