cordova-plugin-ionic-keyboard
cordova-plugin-ionic-keyboard copied to clipboard
View not resizing on iOS
Hi!
For some reason the view is not resizing on iOS for me.
I installed cordova-plugin-ionic-keyboard
and I already have cordova-plugin-ionic-webview
in my plugins.
I of course have the following in my config.xml
:
<preference name="KeyboardResizeMode" value="ionic" />
<preference name="KeyboardResize" value="true" />
I also tried using native
as the value for KeyboardResizeMode
, all to no avail.
Any tips?
EDIT - funnily though I have another ionic project with the same config (AFAIK) and there resizing does work.
Same issue here. Did you find what was causing this ?
+1 ... persistent issue
So I keep getting this issue on and off. Today I got it again, and I was able to get this working by downgrading to an older version. I was using 2.1.5 IIRC, and forcing it to install 2.0.5 seems to have fixed this for me.
If you try this out, could you please validate whether it works for you @Alex0x47 @radulescuandrew ?
Hi,
I found an other solution. I uninstalled this plugin, and added the other (deprecated ?) keyboard plugin (https://ionicframework.com/docs/native/keyboard/). Then added a few lines in app.modules.ts. So :
cordova plugin rm cordova-plugin-ionic-keyboard
ionic cordova plugin add ionic-plugin-keyboard && npm install --save @ionic-native/native-keyboard
In app.module.ts :
imports: [
[...]
IonicModule.forRoot(MyApp, {
platforms: {
ios: {
scrollPadding: false,
scrollAssist: false
}
}[...]
}),
[...]
]
This is not a real solution, but I don't have time for this kind of bug.
+1 not resizing with <preference name="KeyboardResizeMode" value="ionic" />
Thanks all for the info. We have a PR for a related bug and will try to get this one fixed as well
Okay all, I need a little more information here because there's interplay between keyboard, webview, and ionic framework.
What versions of each are you all using?
Any repro case we can take a look at?
I use: cordova-plugin-ionic-webview 2.1.4 cordova-plugin-ionic-keyboard latest and 2.0.5
<preference name="KeyboardResize" value="true" />
<preference name="KeyboardResizeMode" value="native" />
no way the webview is not resizing, the keyboard overlay content Maybe it's related with this: https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/176
What version of Ionic?
I dont use Ionic in this app
global packages: cordova (Cordova CLI) : 8.0.0
local packages: @ionic/app-scripts : 3.1.8 Cordova Platforms : android 7.0.0 ios 4.5.5 Ionic Framework : ionic-angular 3.9.2
cordova-plugin-ionic-webview 2.0.2 "cordova-plugin-ionic-webview" ionic-plugin-keyboard 2.2.1 "Keyboard"
I hope it will help.
Ionic: ionic (Ionic CLI): 4.1.2 Ionic Framework: ionic-angular 3.9.2 @ionic/app-scripts : 3.2.0
Cordova: cordova (Cordova CLI): 8.1.1 ([email protected]) Cordova Platforms: ios 4.5.5 Cordova Plugins: cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.1.4
System: ios-deploy : 1.9.2 ios-sim: 5.0.3 NodeJS: v9.10.0 npm: 5.6.0 OS : macOS Xcode: Xcode 10.0 Build version 10A255
Another to the list, No Ionic, Cordova 8.1.1, ios platform 4.5.5. UIWebView
Tried with WKWebView, although it seems to be working... ish, there are other issues there.
been banging my head against a wall for the last few hours. i assume same issue here.
https://github.com/cjpearson/cordova-plugin-keyboard/issues/77
seems to only be recent builds, i assume ios 12 sdk?
I don't know obj-c but i beat it with a rock until i got something that fixes it, at-least in my use case. hope this helps
https://gist.github.com/cokeeffekt/08e43798890ccde032b76ab7c105adcf
Just as a heads up, we don't support this plugin if you don't use Ionic. The reason is because Ionic Framework also has logic for keyboard interaction that you don't get without it. I'm not trying to force you to use Ionic but it's not as simple as just using this plugin. They both work together to achieve proper keyboard operation.
So the above workaround of downgrading to 2.0.5 seems to have broken when using iOS 12. I know your post isn't probably directed to me @mlynch but I am indeed using Ionic.
@mlynch
"cordova-plugin-ionic-webview": "^1.2.1",
"ionic-angular": "3.9.2",
"cordova-plugin-ionic-keyboard": "2.1.5",
And since of iOS 12 also with
"cordova-plugin-ionic-keyboard": "2.0.5", which formerly used to work fine.
Hi team - I'm working with a community member who is having this issue. So far they're only seeing this behavior on devices running ios 12, and have been unable to reproduce on an emulator.
+1 Any solution?
2019 and still is a problem...
Indeed, fighting this for a day already. No solution yet.
Downgrading has @Alex0x47 suggested is the only solution which worked for me
That's a pity. Any news from the Ionic team? I already spent way too much time on this...
I tried @Alex0x47 solution but I get the following errors:
npm WARN @ionic-native/[email protected] requires a peer of rxjs@^6.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/[email protected] requires a peer of @ionic-native/core@^5.1.0 but none is installed. You must install peer dependencies yourself.
What can I do?
@CharlieIGG can you provide a sample app where the issue can be reproduced? I couldn't reproduce on a new Ionic 4 app.
For the rest of people commenting, specially to those not using ionic, <preference name="KeyboardResizeMode" value="ionic" />
only works on Ionic apps, so if you are using that preference it won't work in your apps.
If you are not using that preference, then it's a different issue, report it in a new issue, and please, provide a sample app where it can be reproduced.
"@ionic-native/keyboard": "^4.20.0", "cordova-plugin-ionic-keyboard": "^2.2.0", "cordova-plugin-ionic-webview": "^4.1.1",
View not getting resized, can we get a fix? Our app depends on this feature to work because we have a textarea in ion-footer the content is not getting pushed up like it's suppose to be.
Strongly recommending that, I use below (viewport-fit is the issue, ignore my other settings like width height etc, or use as is)
<meta name="viewport" content="minimal-ui, user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=320, height=device-height, viewport-fit=cover">
together with these, I also use cordova-plugin-statusbar and cordova-plugin-navigationbar-color for Android and cordova-plugin-webviewcolor for iOS, then I can set colors for top and bottom for both platforms (even transparent for ios and plugin also sets keyboard hue on iOS)
@jcesarmobile sadly I missed your request and I'm just seeing this from a notification I got on the last comment.
I no longer have access to the repo where I had this problem. Where I left we had to lock-on to the older version.
I'm really hoping to never having to deal with Cordova ever again, plus I have nothing else I can contribute here, so I'm unsubscribing form this thread.
I'm hesitant to close the issue, given that it also seems to affect other people and no definitive solution has been given, but feel free to close it if it matches your house-keeping criteria @jcesarmobile
+1 Hi, Since the issue still persist , i also faced a similar kind of issue .i will put it out here if it helps.
Resize keyboard is not working for IOS 13 (13.2 specially) i have tried with v 2.2.0 and 2.1.3 both. I have been using this plugin (v 2.1.3),but ever since IOS 13 is released its keyboard resize feature for IOS 13 is not working. I have tested on multiple devices , with both IOS 12.4 and 13.2, it works fine with 12.4 but breaks for 13.2 on the same device and keyboard covers the area of screen equals to its height. all fields and functions behind it are not accessible unless keyboard is closed.