I have a simple view with a login form. On Android, if the keyboard is opened, the content is not scrolling up to prevent it from getting behind the keyboard.
I followed the Keyboard instructions from the docs, and read a lot of forum posts, but I haven't figured it out.
I installed the Keyboard plugin com.ionic.keyboard
.
This is the structure of the page:
<ion-nav-view>
<ion-view>
<ion-content>
...<form>..Login form..</form>...
</ion-content>
</ion-view>
</ion-nav-view>
If I put some extra dummy content in the page, it shows that ion-content is indeed scrollable. However, it's not moving up when the keyboard is opened by focusing on an input.
1.0.0-beta.13
Is there anything else I have to do?
ion-contentThe Content component provides an easy to use content area with some useful methods to control the scrollable area. There should only be one content in a single view component. If additional scrollable elements are need, use ionScroll.
Content Scrolling Disable Enable IONIC Framework - We can disable/enable scrollbar pragmatically. There are some some example are give, you your suitable. Example 1 - Try a setting <content scroll="false"> that will disable scrolling. This every time an event is called, in our case, on every drag event.
First step is to achieve the go to top button or scroll to top or bottom button is the scroll-events property of ion-content. This property allows ion-content to listen the scroll events like scroll-start, scroll-end and apply scroll methods to scroll the page to the particular position of the page.
In the section where you declare the keyboard plugin, try to add this:
if (window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(false);
}
I have prevent this scrolling property in my project by setting below values in AndroidManifest.xml file.
android:windowSoftInputMode = "adjustNothing"
Please check whether android:windowSoftInputMode
value is adjustResize
or not in AndroidManifest.xml. If not please update it to adjustResize
.
I hope this will you. Thanks
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