Skip to content

Commit c073ad4

Browse files
authored
fix(ui5-input): Prevent dialog closing on Escape (#3043)
1 parent 1e84473 commit c073ad4

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

packages/main/src/Input.js

-3
Original file line numberDiff line numberDiff line change
@@ -649,9 +649,6 @@ class Input extends UI5Element {
649649
// Mark that the selection has been canceled, so the popover can close
650650
// and not reopen, due to receiving focus.
651651
this.suggestionSelectionCanceled = true;
652-
653-
// Close suggestion popover
654-
this._closeRespPopover(true);
655652
}
656653
}
657654

packages/main/test/specs/Input.spec.js

+9
Original file line numberDiff line numberDiff line change
@@ -445,8 +445,17 @@ describe("Input general interaction", () => {
445445

446446
const staticAreaItemClassName = browser.getStaticAreaItemClassName("#inputInDialog");
447447
const popover = browser.$(`.${staticAreaItemClassName}`).shadow$("ui5-responsive-popover");
448+
const dialog = browser.$("#inputInDialog");
448449

449450
//assert
450451
assert.ok(popover.isDisplayedInViewport(), "The popover is visible");
452+
453+
// act
454+
input.keys("ArrowDown");
455+
browser.keys("Escape");
456+
457+
// assert
458+
assert.notOk(popover.isDisplayedInViewport(), "The popover is not visible");
459+
assert.ok(dialog.isDisplayedInViewport(), "The dialog is opened.");
451460
});
452461
});

0 commit comments

Comments
 (0)