cocos-engine
cocos-engine copied to clipboard
[CC 3.6.3, Safari IOS, IOS 17.1] UI don't display correctly when change orientation on safari IOS 17.1
Cocos Creator version
3.6.3
System information
IOS 17.1
Issue description
Take a look into video you will see that : UI don't display correctly when change orientation
https://github.com/cocos/cocos-engine/assets/78413486/9643733b-eb68-40ee-ad74-14430ced76fd
Relevant error log output
No response
Steps to reproduce
- Just create a empty project on cocos creator 3.6.3
- Build with my setting as screenshot below :
- Build as web-mobile and choose orientation is lanspace
Minimal reproduction project
You can use this project to test
the same problem, cocos creator 3.8.2, ios 17.1 safari
It looks like the iOS 17(17.0, 17.1, 17.2, 17.3) screen rotation time has become longer. in file “engine/pal/screen-adapter/web/screen-adapter.ts”, EVENT_TIMEOUT = 200ms. At this time, the screen rotation has not been completed, so The size is wrong. It is need to change the EVENT_TIMEOUT >= 500ms(The actual time of the screen rotation is not tested). But after upgrading iOS 17.4, 200ms it’s okay.
I'm using ios 17.4 safari with cocos creator 3.8.2(3.8.1) without this problem