I built a cordova app for iOS with Framework7 v2.3.1, using:
It works perfectly, but a few days ago I compiled the Cordova app for iOS with Xcode 10. On iOS 12 device, if the app is compiled with Xcode 10, when I select an input field the keyboard appears and the view scrolls up, but when the keyboard closes, the view doesn’t scroll down, the blank space of the keyboard remains. The problem there isn’t if I compile the app with Xcode 9.4 and I install it on a device with iOS 12, or if the app is compiled with Xcode 10 and installed on a device with iOS 11.x I uploaded a screenshot to explain better the problem Does anybody have a solution? Thanks
Use this plugin https://www.npmjs.com/package/cordova-plugin-keyboard#keyboarddidhide
or "cordova plugin add cordova-plugin-keyboard"
Then just add this on deviceReady:
Keyboard.automaticScrollToTopOnHiding = true;
This works for me in ios12
I fix it by a tricky method,You should try:
- (void)keybordDidHide {
if (!CGPointEqualToPoint(self.lastContentOffset, self.webView.scrollView.contentOffset)) {
[self.webView.scrollView setContentOffset:self.lastContentOffset];
[self.webView.scrollView setContentInset:UIEdgeInsetsMake(0, 0, 0, 0)];
}
}
- (void)keybordWillShow {
self.lastContentOffset = self.webView.scrollView.contentOffset;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With