I am using simple list view of ionic framework it works fine in some devices and some devices it hides the scroll bar. User can not scroll at all in some devices. Many of the users are facing same problem and they have discussed it here.
To reproduce the same issue
create app with
ionic start scrollTest sidemenu
-Modified "PlaylistsCtrl" Controller to be:
.controller('PlaylistsCtrl', function($scope) {
$scope.playlists = [
{ title: 'Reggae', id: 1 },
{ title: 'Chill', id: 2 },
{ title: 'Dubstep', id: 3 },
{ title: 'Indie', id: 4 },
{ title: 'Rap', id: 5 },
{ title: 'Cowbell', id: 6 },
{ title: 'Breaks', id: 7 },
{ title: 'Jungle', id: 8 },
{ title: 'Drum & Bass', id: 9 },
{ title: 'Classics', id: 10 },
{ title: 'Blah', id: 11 },
{ title: 'Foo', id: 12 },
{ title: 'Bar', id: 13 },
{ title: 'House', id: 14 },
{ title: 'Trance', id: 15 },
{ title: 'EDM', id: 15 },
{ title: 'Country', id: 16 },
{ title: 'Rock', id: 17 }
];
})
-Set overflow-scroll to true in playlists.html:
<ion-content class="has-header" overflow-scroll="true">...
-Launch app on device:
ionic run android
... and once it starts, the init view (playlists) does not scroll...
Any one can help me out how to deal with this issue it will be great, as we can not launch the application without solving this bug.
Use this ionic js:
<script src="//code.ionicframework.com/nightly/js/ionic.bundle.min.js"></script>
Remove overflow-scroll="true" in
<ion-content class="has-header" overflow-scroll="true">
Add this code in app.js
if(ionic.Platform.isAndroid())
$ionicConfigProvider.scrolling.jsScrolling(false);
Eg:
angular.module('ionicApp', ['ionic']).config(function($ionicConfigProvider) {
if (ionic.Platform.isAndroid())
$ionicConfigProvider.scrolling.jsScrolling(false);
})
the above code does same things as overflow-scroll="true" do . and it use native scroll instead of jsScroll