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

disableScroll method disappear #42

Closed
Makeon opened this issue Sep 26, 2018 · 29 comments · Fixed by #102
Closed

disableScroll method disappear #42

Makeon opened this issue Sep 26, 2018 · 29 comments · Fixed by #102

Comments

@Makeon
Copy link

Makeon commented Sep 26, 2018

disableScroll() method disappear in 4.15.0 version
what method one need use now?

@NMastracchio
Copy link

This boggles my mind. Amidst the sea of seemingly infinite Stack and Ionic forum posts about scrolling/keyboard issues, using the disableScroll method is the most common solution. And yet, they removed it from the currently supported plugin.

@mlynch
Copy link

mlynch commented Sep 26, 2018

Version 4.15.0 of what? The current keyboard plugin version is 2.1.3

@togro
Copy link

togro commented Sep 27, 2018

disableScroll() method disappear in 4.15.0 version
what method one need use now?

On 4.15.0 disappear, I donwgrade version with

npm install --save @ionic-native/keyboard@4.12.0 and works again

@Makeon
Copy link
Author

Makeon commented Oct 2, 2018

Version 4.15.0 of what? The current keyboard plugin version is 2.1.3
Version 4.15.0 of @ionic-native/keyboard
I downgrade to 4.13.0 and it works
But I'd like to use the latest version, it has useful methods and I need disableScroll()
How I can replace disableScroll() in 4.15.0?

@Xample
Copy link

Xample commented Oct 3, 2018

I am also looking for an alternative. I do now have a glitch when arriving on a page with autofocus (the keyboard opens, covers half of the page and the header is hidden)

@abhijithp
Copy link

+1

@heidji
Copy link

heidji commented Oct 4, 2018

this function is crucial for iOS. haven't seen any other method stop the unwanted scrolling behavior.
downgrading until solved.

@mlynch
Copy link

mlynch commented Oct 4, 2018

@manucorporat I see disableScroll is in our older deprecated plugin but not this one. Maybe just an oversight? https://github.com/ionic-team/ionic-plugin-keyboard/blob/master/src/ios/IonicKeyboard.m

Thoughts on adding that back in?

@lokkeshjaya
Copy link

lokkeshjaya commented Oct 5, 2018

Hi @mlynch
Is there an ETA on when the disableScroll function would be added back to the latest plugin?

@collindutter
Copy link

I was able to fix my keyboard resizing issues with this config preference:
<preference name="KeyboardResize" value="false" />

Sorry if this is obvious, but somehow I missed this option after hours of searching!

@Xample
Copy link

Xample commented Oct 13, 2018

@collindutter it worth giving a try, perhaps I can do the same. I just need to make sure it will work across the whole app

@ghost
Copy link

ghost commented Nov 16, 2018

@Xample @mlynch Found a solution?

@tribalboy3000
Copy link

tribalboy3000 commented Dec 3, 2018

<preference name="KeyboardResize" value="false" />

Does not work

@ghost
Copy link

ghost commented Dec 3, 2018

npm install --save @ionic-native/keyboard@4.12.0

GOOOOOOOD

@tribalboy3000
Copy link

This still didn't work for me.
'cordova plugin list' shows: cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
package.json dependencies show:
"@ionic-native/keyboard": "^4.12.0",
"cordova-plugin-ionic-keyboard": "2.1.3",

Then in deviceready I tried:
Keyboard.disableScroll(true); & cordova.plugins.Keyboard.disableScroll(true);

But when I focus on an input it still scrolls. Am I missing something?

@heidji
Copy link

heidji commented Dec 6, 2018

maybe something you missed in the config.xml but this isn't the issue to discuss it at. this bug merely talks about a missing function..

@uviekelvin
Copy link

This issue is really frustrating. hoping this get resolves by the ionic team

@JrSagas
Copy link

JrSagas commented Jan 21, 2019

This still didn't work for me.
'cordova plugin list' shows: cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
package.json dependencies show:
"@ionic-native/keyboard": "^4.12.0",
"cordova-plugin-ionic-keyboard": "2.1.3",

Then in deviceready I tried:
Keyboard.disableScroll(true); & cordova.plugins.Keyboard.disableScroll(true);

But when I focus on an input it still scrolls. Am I missing something?

Hi, did you get a solution?
I have the same issue

@tmk1991
Copy link

tmk1991 commented Jan 24, 2019

@mlynch everyone is referring to the @ionic/native wrapper for the keyboard. There was an issue where the wrapper wasn't using this cordova plugin before. See @mhartington 's response: danielsogl/awesome-cordova-plugins#2306 (comment)

danielsogl/awesome-cordova-plugins#2743

on the version 4.15.0 of the native wrapper this was corrected but now this cordova plugin doesn't have the disableScroll functionality. https://github.com/ionic-team/ionic-native/blob/master/CHANGELOG.md

@floriandorre
Copy link

Any news about this issue ?

@ghost
Copy link

ghost commented Jul 4, 2019

npm install --save @ionic-native/keyboard@4.12.0

🤦🏻‍♀️

@heikomat
Copy link

heikomat commented Jul 7, 2019

I had a problem where the app would automatically scroll to the focused element whenever an element got focused, and there seemed to be no way to prevent this.

Downgrading @ionic-native/keyboard was not an option, because of incompatible rxjs versions.

As it turns out, There is an undocumented (private) configration for the IonicModule called scrollAssist, wich is true by default, but can just be disabled like this in your app.module.ts:

    IonicModule.forRoot({scrollAssist: false}),

Disabling scrollassist made the app no longer auto-scroll to focused elements on iOS.
See this SO-answer for some more context.

@Heliks

This comment has been minimized.

@nawwa
Copy link

nawwa commented Aug 20, 2019

Any progress ?

Kinda solved using :

"cordova-plugin-ionic-keyboard": "^2.1.3"
"@ionic-native/keyboard": "^4.20.0"

IonicModule.forRoot(MyApp, {
scrollPadding: false,
scrollAssist: false,
autoFocusAssist: false
})

declare const Keyboard: any;
Keyboard.hideFormAccessoryBar(true);
Keyboard.disableScroll(true);

I say "kinda" because it's still scrolling on textarea.. but that solve 90% of my problems.

@desmondcain
Copy link

desmondcain commented Aug 20, 2019

To fix this for me, the problem was that I had to switch from UIWebView to WKWebView and use cordova-plugin-ionic-keyboard. As noted here: https://github.com/ionic-team/cordova-plugin-ionic-keyboard#cordova-plugin-ionic-keyboard cordova keyboard is meant to work with WKWebView. I stumbled on this after digging around and landing on Max's comment: ionic-team/ionic-plugin-keyboard#305 (comment)

Here's the docs for updating webviews: https://ionicframework.com/docs/v3/wkwebview/#

@mlynch
Copy link

mlynch commented Aug 20, 2019

@Heliks hid your comment as it's abusive and unproductive. Watch your behavior.

We're going to be adding this feature back into either the keyboard plugin or the webview plugin and will provide an update once that is ready.

@heidji
Copy link

heidji commented Aug 20, 2019

why is this discussion even happening here? isn't the problem about the ionic-native wrapper or am i missing something?

@jcesarmobile
Copy link
Member

@heidji the ionic wrapper was using the old keyboard plugin, which is deprecated. The wrapper now uses this plugin, which doesn't have disableScroll method and people is complaining about it.

@heidji
Copy link

heidji commented Aug 20, 2019

@jcesarmobile oh i see it now, it just displays a warning that it was removed :D, sorry I misread the function

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

Successfully merging a pull request may close this issue.