diff --git a/packages/main/src/Input.js b/packages/main/src/Input.js index b583edd3b73e..3682b41f700c 100644 --- a/packages/main/src/Input.js +++ b/packages/main/src/Input.js @@ -605,6 +605,10 @@ class Input extends UI5Element { return this._handleEscape(event); } + if (this.showSuggestions) { + this.Suggestions._deselectItems(); + } + this._keyDown = true; } diff --git a/packages/main/src/features/InputSuggestions.js b/packages/main/src/features/InputSuggestions.js index 2c6cef2821be..526ed70d6024 100644 --- a/packages/main/src/features/InputSuggestions.js +++ b/packages/main/src/features/InputSuggestions.js @@ -301,6 +301,13 @@ class Suggestions { } } + _deselectItems() { + const items = this._getItems(); + items.forEach(item => { + item.selected = false; + }); + } + _isItemIntoView(item) { const rectItem = item.getDomRef().getBoundingClientRect(); const rectInput = this._getComponent().getDomRef().getBoundingClientRect();