Greetings,
I’m currently attempting to adjust the canvas position when the soft keyboard appears in the native environment. However, I’m encountering an issue in obtaining the size of the keyboard.
var parentNode = cc.find("Canvas/ParentNode");
cc.systemEvent.on(cc.SystemEvent.EventType.KEYBOARD_WILL_SHOW, function (event) {
parentNode.y += event.keyboardHeight;
});
cc.systemEvent.on(cc.SystemEvent.EventType.KEYBOARD_WILL_HIDE, function (event) {
parentNode.y -= event.keyboardHeight;
});
This code used to function as intended, but it seems to be ineffective in Cocos Creator version 3.6.2.