From caf35a70c814561e27ebb8f372c06f6b51ee420a Mon Sep 17 00:00:00 2001 From: finscn Date: Mon, 25 Mar 2024 11:55:23 +0800 Subject: [PATCH] fix bug about orientation & safeArea ( CCView.js ) (#16714) Should force trigger resize event when the orientation changed. --- cocos2d/core/platform/CCView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos2d/core/platform/CCView.js b/cocos2d/core/platform/CCView.js index 059eb8fbe26..be2ca11398d 100644 --- a/cocos2d/core/platform/CCView.js +++ b/cocos2d/core/platform/CCView.js @@ -209,7 +209,7 @@ cc.js.mixin(View.prototype, { _orientationChange: function () { cc.view._orientationChanging = true; - cc.view._resizeEvent(); + cc.view._resizeEvent(true); // HACK: show nav bar on iOS safari // safari will enter fullscreen when rotate to landscape // need to exit fullscreen when rotate back to portrait, scrollTo(0, 1) works.