bigSlide.js icon indicating copy to clipboard operation
bigSlide.js copied to clipboard

Android Issue

Open MikeHarrison opened this issue 11 years ago • 7 comments

Hi,

I am having an issue where on Android phones the menu slides in then immediately slides out. Working fine on desktop browsers and on iPhone.

MikeHarrison avatar Sep 25 '14 15:09 MikeHarrison

@MikeHarrison is this in the default Android browser or Chrome? And do you mind logging the Android and browser version numbers?

Thanks!

ascott1 avatar Sep 25 '14 15:09 ascott1

@ascott1 it is in the default android browser, android 4.3 and browser 4.3. It is only happening on my implementation, not on the demo site. I have uploaded here:

http://hammr.co/9338102/3/index.html

Please excuse the colour scheme, super rough work in progress!

Bigslide menu kicks in below 920px screen width

MikeHarrison avatar Sep 25 '14 16:09 MikeHarrison

This is just a first guess, but could it be because of the duplicate use of the menu-big ID?

ascott1 avatar Sep 25 '14 21:09 ascott1

Just fixed that - no joy unfortunately.

http://hammr.co/9338102/4/index.html

It works fine on a Galaxy S4 emulator running android 4.4.2, just seems to be anything below that (tested 4.1.1 and 4.3)

MikeHarrison avatar Sep 25 '14 21:09 MikeHarrison

@MikeHarrison Hi Mike, did you ever find out what the cause was? I'm having the same issue, like you it's only happening on older versions of Android (it's running inside a PhoneGap App). All is working fine on desktops and iOS.

I've spent far too long trying to work this out and am close to giving up and using a different plugin.

Thanks.

simonwatt avatar May 25 '15 03:05 simonwatt

@simonwatt I didn't work it out. In the end as I was using Bourbon and Neat I used this refill:

http://refills.bourbon.io/components/#sliding-panel

Sorry I couldn't be of more help!

MikeHarrison avatar May 25 '15 10:05 MikeHarrison

I could only reproduce this on Android 4.1 and earlier using the default browser, Chrome and Firefox on the same device are fine. This was leading to problems on PhoneGap Apps as I assume they are using the Android browser in the web view in these versions of Android.

If I remove the touchStart event here:

    // register a click listener for desktop & touchstart for mobile
    menuLink.on('click.bigSlide touchstart.bigSlide', function(e) { ...

And replace it with just the click event:

    // register a click listener for desktop & touchstart for mobile
    menuLink.on('click.bigSlide', function(e) {

Then the problem goes away.. I haven't checked yet if not using touchStart will cause issues on iOS (such as too much of a delay), but if so I'll do some browser detection and only wire up touchStart on iOS.

Note - I can NOT reproduce the error using the blgSlide.js demo page, so there might be something specific in my app that is causing issues with touchStart. I'm heavily using backbone.js, so there could be something in there that is clashing.

simonwatt avatar Jun 03 '15 04:06 simonwatt