Unable to Disable Keyboard Scroll on Ionic 2@beta.3


#1

Continuing the discussion from Disable scroll ionic2 ios9 Not working:

Hi matthew,

Any luck? I’m having the same problem here.

Keyboard.disableScroll(true)

doesn’t seem to work:

Expected Behaviour:

When I focus on an input field, keyboard shows up, but should not scroll view.

Plugin Version:
“name”: “ionic-plugin-keyboard”,
“version”: “2.0.1”,

My system information:

Cordova CLI: 6.0.0
Ionic Version: 2.0.0-beta.3
Ionic CLI Version: 2.0.0-beta.19
Ionic App Lib Version: 2.0.0-beta.9
ios-deploy version: 1.8.5
ios-sim version: 5.0.6
OS: Mac OS X El Capitan
Node Version: v4.3.0
Xcode version: Xcode 7.2.1 Build version 7C1002


#2

Would you open an issue for this. I’m not 100% sure where we stand on this, so it would be nice to discuss this.


#3

It seems like your DOM elements could be moving and not the whole UIScrollView. Haven’t tried this plugin yet but does your header remain in its place and only the DOM scrolls or the whole UI shifts?

Read this for more clarification : https://github.com/driftyco/ionic-plugin-keyboard

As mentioned there:

Prevent the native UIScrollView from moving when an input is focused. The telltale sign that this is happening is the top of your app scrolls out of view (if using Ionic, your header bar will disappear).

This does not prevent any DOM elements from being able to scroll. That needs to happen from CSS and JavaScript, not this plugin


Weird padding showing up on scroll-content
#4

@icba How then do you disable it via CSS and JavaScript


#5

As a follow-up, if i use Keyboard.disableScroll(true), it still runs on Android because it has not been implemented for it


#6

From the linked thread:

Looks like a solution has been found.

Now I haven’t yet implemented keyboard in my app, but I think this JavaScript / CSS way would do it :

http://kirbysayshi.com/2013/08/19/maintaining-scroll-position-knockoutjs-list.html

Oh and if Keyboard.disableScroll(true) does work on android and not on iOS, then perhaps the ionic team can look into it. Why don’t you open up an issue on github?


#7

@mhartington, @adrianteh: This issue of the keyboard scrollAssist leaving unwanted padding on the content view is being collected to https://github.com/driftyco/ionic/issues/5432

I’ve updated the original thread with a workaround that I’ve had some success with.


#8

Still the same problem with Beta.7?
I have the same issue right now.
Any help?