mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user