From 915278a29bedf24c32187f7b48065f0199131dec Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Sat, 23 Jan 2016 12:52:31 -0500 Subject: [PATCH] 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 --- ionic/components/searchbar/searchbar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ionic/components/searchbar/searchbar.ts b/ionic/components/searchbar/searchbar.ts index e4902ba770..ed0346a589 100644 --- a/ionic/components/searchbar/searchbar.ts +++ b/ionic/components/searchbar/searchbar.ts @@ -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; }