简体   繁体   中英

iOS Safari Premature word wrapping in flex container on iOS 16+, not below

I have a flex based button with some text and an icon. On an iPhone 14 Pro Max the words wrap prematurely regardless of font size, font type, and/or number of words. Seemingly only wraps the last word. This issue appears on iOS 16+ but not below. Tested in BrowserStack and can't figure out what's happening.

iOS 16+:

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

iOS 15/below:

在此处输入图像描述

button css

display: flex;
width: fit-content;
justify-content: center;
align-items: center;

I found a previous thread talking about a Safari issue wrapping the Inter font incorrectly but this seems to occur regardless of the font I use.

If I adjust the icon size it will allow the text to wrap correctly, but only for certain icon sizes.

To investigate this further, try testing the same on an actual physical device.

Also, run this test on a local Appium grid.

This shall help you pin down the issue.

If the behavior is the same on these, too, then probably something would be off with iOS 16+

Thanks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM