API to disable <body> scrolling
https://github.com/ionic-team/cordova-plugin-ionic-webview/blob/486d412ad365b76aae40b25c758551310368a35b/src/ios/CDVWKWebViewEngine.m#L649
Ionic works better if the <body> scrolling is completely disabled.
Some possible solution
- Provide an API that ionic can use without importing capacitor directly
- Provide some API that can be used directly using the capacitor config, so ionic starters can be preconfigured to disable scrolling
- Provide some runtime API so the value can be changed later by the developer.
(notice the scroll bar on the right) this is with content that shouldn't scroll (and doesn't scroll on web).

Agreed, this is also an obstacle when creating scrollable components.
We could easily just disable it. I think we do that by default in Ionic's config.xml for our starters, no?
@mlynch you are right! it would be great to provide it as a option in capacitor.config.js as well as a runtime option.
Do we have a Webview Plugin? so app can customize things about the webview itself?
FYI, after removing some hacky css we had to account for iPhone X (thanks @manucorporat ) we no longer see the scrollbar - so I'm not seeing the bug anymore
Next version of ionic will include the CSS hack, so you should remove it completely! Also kudos to @jcesarmobile for the CSS fix!
I also think we still need the scrollEnabled option, i might another bug in Sworkit because of this, i believe it should be fixed by disabling the body scroll
Capacitor doesn't have a webview plugin, it's just core to the engine. It can/should be configured just like any other plugin though
@mlynch not sure if you saw I sent a PR that allows to configure it like this.
"ios": {
"scrollEnabled": false
}
Do you mean it should be like this instead?
"plugins": {
"WebView": {
"scrollEnabled": false
}
}
Is there any way for android to hide the scroll bar?
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 Capacitor, please create a new issue and ensure the template is fully filled out.