fix(searchbar): hardcoding the width of the icon for now since it is zero on init

If the user drastically changes the search icon width in the Sass we
will have a problem so this is really just a temporary fix.

Closes #5029
This commit is contained in:
Brandy Carney
2016-01-23 12:52:31 -05:00
parent 21ae736b9a
commit 915278a29b

View File

@@ -210,7 +210,7 @@ export class Searchbar extends Ion {
this.inputElement.style.paddingLeft = inputLeft;
// Set the icon margin left
let iconLeft = "calc(50% - " + ((textWidth / 2) + this.searchIconElement.offsetWidth + 15) + "px)";
let iconLeft = "calc(50% - " + ((textWidth / 2) + 30) + "px)";
this.searchIconElement.style.marginLeft = iconLeft;
}