iOS 9 bug opening keyboard

I’m using cocos2d js 3.6. I’m having an issue when trying to enter text on a textfield on iOS 9


When the game starts the log says:
cocos2d: surface size: 1024x768

But when the bug occurrs it says
cocos2d: surface size: 768x1024

This seems to happen just when cocos detects that the keyboard is going to intersect with the textfield.

The game is made to run just in landscape mode, but in the settings of the iOS project I have the following:

Because there is also a gallery in the game where you can pick an image to be uploaded (UIImagePickerViewController) and if I don’t allow the portrait mode, that controller crashes.

Does anyone know a workaround for this?. Thanks in advance.

I am seeing this issue in Cocos2D-X 3.5 (C++) running on an iPhone 6s, iOS 9.3.1. Interestingly, it’s quasi-fixed if I set the EditBox InputFlag to “SENSITIVE”, but breaks if I rotate while the keyboard is open.

I verified this is still an issue in version 3.10 by making 2 changes to cpp-tests:

  1. check the “Portrait” box in the target settings

  2. change line 63 of RootViewController.mm to:

     return UIInterfaceOrientationMaskLandscape; // still lock to landscape, instead of all but...