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

Scrolling not working on mobile devices #132

Closed
photon43 opened this issue Nov 2, 2015 · 8 comments
Closed

Scrolling not working on mobile devices #132

photon43 opened this issue Nov 2, 2015 · 8 comments
Assignees
Labels

Comments

@photon43
Copy link

photon43 commented Nov 2, 2015

Got everything working great except that when the menu in the slide out is vertically longer that the viewport (very common in landscape orientation), the user can not scroll the menu vertically to reveal the rest of the menu items. This does work on desktop clients with the default ugly sidebars but seems to be entirely non functional on mobile touch devices.

Even testing the demo at https://mango.github.io/slideout/ yields the same behavior.
Am I missing something? It is otherwise a really great solution for us here. Please advise. Thank you!

@photon43
Copy link
Author

photon43 commented Nov 2, 2015

I have already @Vinsanity suggested CSS improvements found here: #102. Still not working though. Thoughts?

@photon43 photon43 mentioned this issue Nov 2, 2015
@ffacal
Copy link

ffacal commented Nov 3, 2015

I think the issue resides in the following function, which seems to prevent the panel from scrolling when the menu is opened.

   /**
   * Prevents touchmove event if slideout is moving
   */
  this._preventMove = function(eve) {
    if (self._moved || self._opened) {
      //eve.preventDefault();
    }
  };

Commenting fixes it partially (allows panell scrolling while the menu is active which is not cool) but the right fix would be preventing default ONLY when the evt target is a panel's child element and not any element.

@janwidmer
Copy link

I have the same problem, seems to be introduced by the newest release. I have it successfully working with version 0.1.9

@pazguille pazguille added the bug label Nov 3, 2015
@pazguille pazguille self-assigned this Nov 3, 2015
@pazguille pazguille modified the milestone: 0.1.10 Nov 3, 2015
@pazguille
Copy link
Member

Sorry guys! Thanks for reporting this bug. Fixed on v0.1.11.

@photon43
Copy link
Author

photon43 commented Nov 3, 2015

Great! Thank you!

@janwidmer
Copy link

Perfect. Works again, thanks for the quick fix.

@vitobotta
Copy link

Hi! I am using the latest version but I still have this issue. All works fine apart from the fact that when I have the phone in landscape mode the menu is not scrollable and some items are not visible. Do I need to do something else other than use the latest version?

Thanks in advance :)

@vitobotta
Copy link

Looks like the problem for me was caused by this code

document.addEventListener('touchmove', preventDefault, false)

which I had for the "pull to refresh" action done with iScroll. I have resolved by removing this listener when the side menu is open so to allow for native scrolling of the menu:

 App.slideout.on 'beforeopen', ->
    document.removeEventListener('touchmove', preventDefault, false)

  App.slideout.on 'beforeclose', ->
    document.addEventListener('touchmove', preventDefault, false)

Seems to work fine now...

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

No branches or pull requests

5 participants