-
I am using capacitor 2.4.2 I use an Ionic app embedded in a native app by putting the CAPBridgeViewController in a container-view. When I rotate my ipad to landscape the layout gets messed up and when I rotate it back to portrait it stays messed up. This is only on iOS. I noticed with an auto-generated ionic-app the issue does not occur, but there is an easy way to reproduce:
Possibly capacitor (or ionic) is getting the wrong width and height parameters from the container view. Is there any workaround to this? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
can you provide a sample app? |
Beta Was this translation helpful? Give feedback.
-
https://github.com/korneeld/ios-layoutbug I found that initially the window dimension is: 768 x 1024, and after screen re-orientation it thinks the dimension is: 1280 x 512. |
Beta Was this translation helpful? Give feedback.
-
I managed to fix it by setting translatesAutoresizingMaskIntoConstraints of the webview to false and adding some more constraints. I don't think this is something that can be helped in Capacitor, so you can go ahead and close this. |
Beta Was this translation helpful? Give feedback.
I managed to fix it by setting translatesAutoresizingMaskIntoConstraints of the webview to false and adding some more constraints. I don't think this is something that can be helped in Capacitor, so you can go ahead and close this.