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

Stop scroll to top of page after keyboard hides? #84

Open
steveclarke opened this issue Apr 25, 2019 · 14 comments
Open

Stop scroll to top of page after keyboard hides? #84

steveclarke opened this issue Apr 25, 2019 · 14 comments

Comments

@steveclarke
Copy link

When the keyboard hides after input, my app is automatically scrolled to the top of the screen. I don't see an option to prevent this.

I replaced cordova-plugin-keyboard with this plugin, and that project had an option Keyboard.automaticScrollToTopOnHiding = false. Wondering if there's something similar?

I'm using version 4.0.1 with non-Ionic app. This solved all of my main keyboard issues with the Cordova app (thanks!) with the exception of this little annoyance.

@steveclarke
Copy link
Author

steveclarke commented Apr 25, 2019

Upon further investigation it looks like this only happens on iOS 12.x. Previous iOS works as expected and don't scroll to top of screen after keyboard is hidden/input loses focus.

@ronanmcnulty
Copy link

@steveclarke Did you manage to fix this issue?

@steveclarke
Copy link
Author

No it's still happening for me.

@YCMitch
Copy link

YCMitch commented Jul 15, 2019

Yeah, I'm getting the same with both this plugin and the standard cordova-plugin-keyboard one. No fix found as of yet.

@YCMitch
Copy link

YCMitch commented Jul 17, 2019

Update: ironically, installing cordova-plugin-keyboard and setting Keyboard.automaticScrollToTopOnHiding to true kind of helps, in that it scrolls to the top, but then next render is back where it started.

I definitely wouldn't call it a solution though, and I have no idea why this isn't more widely reported. Eugh. Several days in, and I'm no closer to working out wtf is going on.

@YCMitch
Copy link

YCMitch commented Jul 19, 2019

OH! Sorry about all the comments - I've worked this one out.

It's Ionic's WKWebview plugin - if you move back to Cordova's WKWebview instead, the annoying scrolling goes away.

@steveclarke
Copy link
Author

That's not really an option for me. Ionic version is the only one that solves my UI rendering issue.

@YCMitch
Copy link

YCMitch commented Jul 19, 2019

Why? All the our ionic plugins work okay.

@jcesarmobile
Copy link
Member

By the comments, it looks like you are using cordova-plugin-ionic-webview, is that right? if so I think the bug is caused by it and not by the keyboard plugin.
Can you provide a sample app so it can be reproduced? I can't reproduce on Ionic apps, and you mentioned you weren't using Ionic.

@steveclarke
Copy link
Author

@jcesarmobile Yes I'm using Vue/Quasar with the cordova-plugin-ionic-webview plugin. I'll do up a repro sample app for you in the next couple of days.

@YCMitch
Copy link

YCMitch commented Aug 23, 2019

It's certainly caused by Ionic webview - mine fixed immediately when moving to the generic Cordova WKWebview

@timbru31
Copy link

Crossref to a potential issue on the webview repo: ionic-team/cordova-plugin-ionic-webview#399

@Gillardo
Copy link

Gillardo commented Feb 7, 2020

I am experiencing this issue as well, when will it be fixed?

@sajallimbu
Copy link

Any fix for it yet? I dont want to use default cordova wkwebview plugin cause of the local resource with file:// uri not being allowed which is fixed in ionic-wkwebview.

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

7 participants