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

overflow-scroll="true" not working on android #179

Closed
tzaavi opened this issue Nov 23, 2013 · 14 comments
Closed

overflow-scroll="true" not working on android #179

tzaavi opened this issue Nov 23, 2013 · 14 comments

Comments

@tzaavi
Copy link

tzaavi commented Nov 23, 2013

I'm setting the content directive to use the native scroll [overflow-scroll="true"] and it's not scrolling on android.

@mlynch
Copy link
Contributor

mlynch commented Nov 23, 2013

Thanks for letting us know, I'll take a look and get that fixed! Which
Android device and version are you on?

On Fri, Nov 22, 2013 at 8:10 PM, tzaavi [email protected] wrote:

I'm setting the content directive to use the native scroll
[overflow-scroll="true"] and it's not scrolling on android.


Reply to this email directly or view it on GitHubhttps://github.com//issues/179
.

@tzaavi
Copy link
Author

tzaavi commented Nov 23, 2013

Samsung S4
Android version: 4.2.2

It looks like something prevent the drag event. If I remove the javascript reference and just use the css file and HTML it’s working fine.

@mlynch
Copy link
Contributor

mlynch commented Nov 23, 2013

Hey @tzaavi it might be related to #181 which I just fixed. Would you mind trying a recent release or master pull to see if that fixes it? Thanks!

@tzaavi
Copy link
Author

tzaavi commented Nov 23, 2013

I tested it with the latest from master and it’s still not working.

@mlynch
Copy link
Contributor

mlynch commented Nov 23, 2013

Okay, thanks for doing that. I will take a look here and see what might be
causing it. I'm fixing a few other Android related things right now anyways.

On Sat, Nov 23, 2013 at 9:19 AM, tzaavi [email protected] wrote:

I tested it with the latest from master and it’s still not working.


Reply to this email directly or view it on GitHubhttps://github.com//issues/179#issuecomment-29134194
.

@tzaavi
Copy link
Author

tzaavi commented Nov 23, 2013

I did some testing and I narrow it down to gestures.

If I comment this line in js/utils/gestures.js (line 334) then it works

// trigger the handler
//handler.call(ionic.Gestures.detection, self.collectEventData(element, eventType, self.getTouchList(last_move_event, eventType), ev));

@mlynch
Copy link
Contributor

mlynch commented Nov 24, 2013

Yep, looks like the gesture system is calling event.preventDefault inside of the Drag gesture handler. Basically, there is a drag gesture listened somewhere, and it's not checking if the element is the target. That needs to be fixed, seems like a bug from hammer.js which we use.

@mlynch mlynch closed this as completed in 8fe6e18 Nov 25, 2013
@tzaavi
Copy link
Author

tzaavi commented Nov 25, 2013

I tested the fix but it’s still not scrolling for me. Only work when scroll with 2 fingers.
Something is still blocking the drag event.

@mlynch
Copy link
Contributor

mlynch commented Nov 25, 2013

Odd, it was just working for me. Reopening and taking another look.

@mlynch mlynch reopened this Nov 25, 2013
@tzaavi
Copy link
Author

tzaavi commented Nov 25, 2013

I found a fix that work for me:

In ionicSlideMenu.js in sideMenuContent directive, instead of using drag event I’m using dragright and dragleft.

This solution not blocking the vertical scrolling while still let the use drag the menu left and right.
Another benefit is preventing unwanted menu slide while scrolling vertically.

replace

var dragGesture = Gesture.on('drag', dragFn, $element);

with

var dragRightGesture = Gesture.on('dragright', dragFn, $element);
var dragLeftGesture = Gesture.on('dragleft', dragFn, $element);

replace

Gesture.off(dragGesture, 'drag', dragFn);

with

Gesture.off(dragRightGesture, 'dragright', dragFn);
Gesture.off(dragLeftGesture, 'dragleft', dragFn);

@mlynch mlynch closed this as completed in 3c23369 Nov 26, 2013
@mlynch
Copy link
Contributor

mlynch commented Nov 26, 2013

Thanks, I like that solution. Just tested it on the Nexus 4 and other devices and it works well now. Let me know if there are any other things that pop up.

@cristianrosu
Copy link

Was this solved? I have overflow-scroll='true' set because I need to horizontally scroll wide tables, and It breaks vertical scroll.

@patrickegp
Copy link

i solved with a litle hard code in CSS
overflow-scroll='true' + .scroll-content{ overflow: scroll!important; }

hope to be helpfull :-D Paz from DR

@Fayozjon
Copy link

Patrick

http://wondrew.net/pokupka

23.03.2015, 23:41, "Patrick" [email protected]:i solved with a litle hard code in CSS
overflow-scroll='true' + .scroll-content{ overflow: scroll!important; }

hope to be helpfull :-D Paz from DR

—Reply to this email directly or .

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants