-
Notifications
You must be signed in to change notification settings - Fork 72
Open
vaadin/web-components
#10296Labels
Description
Description
On iOS devices (iPhone), font-based icons (FontIcon / Font Awesome) overflow their container when used directly in components like Button or added directly to layouts (e.g., HorizontalLayout). The icon expands to fill the entire screen or a large portion of it.


Expected outcome
The icon must respect its container in the same way as on desktop and Android
Minimal reproducible example
https://github.com/JefersonSantos06/vaadin-font-icon-error
public class View extends HorizontalLayout {
public View() {
this.add(
new FontIcon("fa-solid", "fa-house")
);
}
}
Steps to reproduce
- Set up a webfont (e.g., Font Awesome)
- Create a simple view with a Button and a HorizontalLayout.
- Use a FontIcon directly as the Button icon, and add another FontIcon directly into the layout.
- Open the app on iOS (Safari/Chrome) and navigate to the view.
- Observe that the icon overflows its container.
- Wrap the same icon inside a
span
and reload. - Observe that, when wrapped in
span
, the icon renders with correct size/position.
Environment
Vaadin version(s): 24.9.0
OS: iOS 16 / 17 (Iphone)
Browsers
Safari on iOS, Chrome