You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When supplying an HTML string as placeholder for a searchbar on iOS mode, the placeholder is displayed as plaintext but not aligned properly. This is because we create a temporary span and actually render the HTML content + then get the width of the element. The actual placeholder is displayed as plaintext and therefore may have a different width.
Since the native placeholder does not accept HTML, we should not be parsing into the temporary span as HTML.
Expected behavior:
I would expect the placeholder to be aligned properly.
Steps to reproduce:
Create ion-searchbar in iOS mode
Supply a placeholder of <ion-searchbar>Test</ion-searchbar>.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Bug Report
Ionic version:
[x] 5.x
Current behavior:
When supplying an HTML string as
placeholder
for a searchbar on iOS mode, the placeholder is displayed as plaintext but not aligned properly. This is because we create a temporary span and actually render the HTML content + then get the width of the element. The actual placeholder is displayed as plaintext and therefore may have a different width.Since the native placeholder does not accept HTML, we should not be parsing into the temporary span as HTML.
Expected behavior:
I would expect the placeholder to be aligned properly.
Steps to reproduce:
ion-searchbar
in iOS modeplaceholder
of<ion-searchbar>Test</ion-searchbar>
.https://github.com/ionic-team/ionic/blob/master/core/src/components/searchbar/searchbar.tsx#L338
The text was updated successfully, but these errors were encountered: