Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

View not resizing on iOS #35

Open
CharlieIGG opened this issue Jul 27, 2018 · 32 comments
Open

View not resizing on iOS #35

CharlieIGG opened this issue Jul 27, 2018 · 32 comments

Comments

@CharlieIGG
Copy link

CharlieIGG commented Jul 27, 2018

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.

@Alex0x47
Copy link

Alex0x47 commented Aug 1, 2018

Same issue here. Did you find what was causing this ?

@radulescuandrew
Copy link

+1 ... persistent issue

@CharlieIGG
Copy link
Author

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 ?

@Alex0x47
Copy link

Alex0x47 commented Aug 4, 2018

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.

@supryan
Copy link

supryan commented Sep 21, 2018

+1 not resizing with <preference name="KeyboardResizeMode" value="ionic" />

@mlynch
Copy link

mlynch commented Sep 21, 2018

Thanks all for the info. We have a PR for a related bug and will try to get this one fixed as well

@mlynch
Copy link

mlynch commented Sep 21, 2018

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?

@Stefano1964
Copy link

Stefano1964 commented Sep 22, 2018

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:
ionic-team/cordova-plugin-ionic-webview#176

@mlynch
Copy link

mlynch commented Sep 22, 2018

What version of Ionic?

@Stefano1964
Copy link

Stefano1964 commented Sep 22, 2018

I dont use Ionic in this app

@Alex0x47
Copy link

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.

@supryan
Copy link

supryan commented Oct 2, 2018

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

@cokeeffekt
Copy link

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.

cjpearson#77

seems to only be recent builds, i assume ios 12 sdk?

@cokeeffekt
Copy link

cokeeffekt commented Oct 4, 2018

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

@mlynch
Copy link

mlynch commented Oct 4, 2018

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.

@CharlieIGG
Copy link
Author

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.

@CharlieIGG
Copy link
Author

@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.

@IonicProSupport
Copy link

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.

@supryan
Copy link

supryan commented Oct 19, 2018

giphy

@noveweb
Copy link

noveweb commented Feb 6, 2019

+1
Any solution?

@samuelfaj
Copy link

2019 and still is a problem...

@dashko
Copy link

dashko commented Mar 25, 2019

Indeed, fighting this for a day already. No solution yet.

@ndriJK
Copy link

ndriJK commented Apr 10, 2019

Downgrading has @Alex0x47 suggested is the only solution which worked for me

@BigBerny
Copy link

That's a pity. Any news from the Ionic team? I already spent way too much time on this...

@BigBerny
Copy link

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?

@jcesarmobile
Copy link
Member

@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.

@yaozuwang
Copy link

"@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.

@gdarcan
Copy link

gdarcan commented Feb 4, 2020

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)

@CharlieIGG
Copy link
Author

@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

@irafayabdul
Copy link

irafayabdul commented Jun 13, 2020

+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.

@markenapps
Copy link

same here

@MarcosBeGo
Copy link

Same issue here. At first it only pushed up the footer, which is useless in my case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests