Issues In Native Scroll In Android 4.x


#1

I have set the global config for js scroll to false

$ionicConfigProvider.scrolling.jsScrolling(false);

So the native scrolling is working fine and efficient. However below are the side effects I am unable to resolve on Android 4.2

  1. Even after reaching the end of the scroll, the list is still scroll-able and white space occupies the screen.

  2. After the list is scrolled, and then any item is clicked in the list, the focus and click get registered way above the click point. Sometimes 2-3 items above the click point.

This problem does not occur when JSScrolling is set to true.

This same issue does not occur when running on android 6, Moto G.

Please let me know how we can fix the issue for Android 4.2 phones.

Would really appreciate your response.

Regards,
Hussain Haideri


#2

Hi Hussain,

I have exactly the same problem.
Have you since found a clean solution to this issue?

Best regards,
Mathieu


#3

Hi,

I was not able to find any solution for the problem i faced. Unfortunately
I had to ignore that version of android for which I was facing the problem.
Or then another option is to enable JS Scroll by compromising on
performance, so that the issue auto resolves.

Let me know if it helps.

Thanks


#4

Hi,

Thanks!

What I did in the end is as you said enabling JS Scroll, but I do it only for Android 4 to be sure not to change the behaviour for other users:

if (ionic.Platform.isAndroid())
{
    var currentPlatformVersion = ionic.Platform.version();
    if(currentPlatformVersion > 0)
    {
        // scrolling problems in Android 4
        if(4 == Math.floor(currentPlatformVersion))
        {
            $ionicConfigProvider.scrolling.jsScrolling(true);
        }
    }
}

This is maybe not the cleanest solution, but I don’t want to spend too much time on Android 4.

Thanks anyway :slight_smile:

Best regards,
Mathieu