Skip to content

Commit

Permalink
fix(ui5-input): fix javascript error on mobile (#1339)
Browse files Browse the repository at this point in the history
  • Loading branch information
fifoosid committed Mar 24, 2020
1 parent 786f4e9 commit c0ffbac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions packages/main/src/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,6 @@ class Input extends UI5Element {
}
}


getInputValue() {
const inputDOM = this.getDomRef();
if (inputDOM) {
Expand All @@ -614,7 +613,7 @@ class Input extends UI5Element {
let inputDomRef;

if (isPhone()) {
inputDomRef = this.getStaticAreaItemDomRef().querySelector(".ui5-input-inner-phone");
inputDomRef = this.Suggestions.responsivePopover.querySelector(".ui5-input-inner-phone");
}

if (!inputDomRef) {
Expand Down
4 changes: 4 additions & 0 deletions packages/main/src/features/InputSuggestions.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,10 @@ class Suggestions {
}

async _respPopover() {
if (this.responsivePopover) {
return this.responsivePopover;
}

const staticAreaItem = await this._getComponent().getStaticAreaItemDomRef();
this.responsivePopover = staticAreaItem.querySelector("ui5-responsive-popover");
return this.responsivePopover;
Expand Down

0 comments on commit c0ffbac

Please sign in to comment.