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

bug: After keyboard open, the content height is wrong #5187

Closed
andre-huehn opened this issue Jan 25, 2016 · 10 comments
Closed

bug: After keyboard open, the content height is wrong #5187

andre-huehn opened this issue Jan 25, 2016 · 10 comments

Comments

@andre-huehn
Copy link

Type: bug

Ionic Version: 1.x

Platform: android 5.1 webview

1.Create a screen without header and footer bars
2.Open the keyboard to enter something
=> The height of the content is calculated in the wrong fashion

Code wrong (Original Source code scrollViewNative.js):
scrollViewOffsetHeight = Math.max(0, Math.min(self.__originalContainerHeight, self.__originalContainerHeight - (e.detail.keyboardHeight - 43)));

Code right (Altered Source Code):
scrollViewOffsetHeight = Math.max(0, Math.min(self.__originalContainerHeight, self.__originalContainerHeight - (e.detail.keyboardHeight - ($scope.$hasHeader ? 43 : 0))));

This could of course also be solved in different ways, but this helped me solving the problem.

@Ionitron Ionitron added the v1 label Jan 25, 2016
@jgw96 jgw96 added the keyboard label Mar 14, 2016
@jgw96
Copy link
Contributor

jgw96 commented Mar 14, 2016

This looks like the same issue as #5800 but im not sure

@andre-huehn
Copy link
Author

Until now i also found out that the problem is still the calculation of the height of the scrollview, but you also need to set the App to fullscreen and set hideKeyboardAccessoryBar(true) .

My problem was fixed because we do not have a Fullscreen App anymore, therefore i can not provide a more detailed problem description.

Regards,
Andre

@adamdbradley
Copy link
Contributor

Sounds like it's fixed now, and the upcoming release has a few more fixes. Thanks.

@m1r4ge
Copy link

m1r4ge commented Jul 19, 2016

@adamdbradley Could you reopen the issue? The problem is still here in v1.3.
The following formula should probably solve the issue and eliminate the magical number 43.

scrollViewOffsetHeight = Math.max(0, Math.min(self.__originalContainerHeight, self.__originalContainerHeight - (e.detail.keyboardHeight - (window.innerHeight - rect.bottom))));

@0pt1m1z3r
Copy link

@jgw96 @adamdbradley The bug is still relevant. Check this fix.

@jgw96
Copy link
Contributor

jgw96 commented Oct 27, 2016

Hello, thanks for using Ionic! This has been fixed in the latest Ionic 1 release 🎉

@jgw96 jgw96 closed this as completed Oct 27, 2016
@0pt1m1z3r
Copy link

@jgw96 No, it's another bug. And it is still there

@Wvhf
Copy link

Wvhf commented Jun 27, 2017

@jgw96 Any update for this issue yet ? Still having this issue in Ionic version 1.3.3

@janpio
Copy link

janpio commented Jun 27, 2017

Ionic v1 lives here now: https://github.com/ionic-team/ionic-v1

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 2, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants