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

Too easy to accidentally close the drawer when scrolling on mobile #73

Closed
wq9 opened this issue Jun 22, 2015 · 6 comments
Closed

Too easy to accidentally close the drawer when scrolling on mobile #73

wq9 opened this issue Jun 22, 2015 · 6 comments
Assignees

Comments

@wq9
Copy link

wq9 commented Jun 22, 2015

When the drawer contains a tall list and the user wants to scroll that list, it is way too easy to accidentally close the drawer because the finger will drag diagonally and a very little horizontal movement will close the drawer.

In the Inbox app, you have to drag left past 50% width to make the drawer close, similar for opening the drawer. Also, in the Inbox app, when you start scrolling the drawer up or down, the drawer is prevented from closing. The drawer will either close or scroll, but not do both.

I think paper-drawer-panel could temporarily disable dragging when a upward or downward finger movement has been detected.

@LukePulverenti
Copy link

I've seen this as well. It's a little too sensitive with diagonal movements. Ideally it should perform identically as the native version. I too have been using Google Inbox as a reference app to compare with.

@blasten
Copy link
Contributor

blasten commented Jun 22, 2015

@wq9 did you try to customize the property edgeSwipeSensitivity? Its default value is 30

@LukePulverenti
Copy link

I don't think you want to raise edgeSwipeSensitivity too much because then it becomes difficult to open the drawer with a thumb swipe. This is really about swipe behavior when the drawer is already open.

For testing purposes, I made a quick change to _trackEnd:

                    this[xDirection || event.detail.dx > -80 ? 'openDrawer' : 'closeDrawer']();

This introduces a delta threshold that must be crossed before the drawer will be closed. More testing is needed to determine if this is the right place for such a change, and then if so, it needs to be configurable similar to edgeSwipeSensitivity.

@frankiefu
Copy link
Contributor

I think this is an issue in the polymer gesture. Ideally the gesture system would not fire track event while scrolling.

cc @azakus

@wq9
Copy link
Author

wq9 commented Jun 22, 2015

@blasten I just set edge-swipe-sensitivity to 80 and then to 160. It only increased the area of the edge and the starting x position of the drawer. There is no swipe threshold and the drawer would open or close as soon as event.detail.dx > 0.

I looked more closely at the native drawer of Inbox and it seems that in addition of a 50% width threshold, they have a swipe velocity. (quick horizontal swipe = open/close drawer, otherwise apply 50% width threshold)

@blasten
Copy link
Contributor

blasten commented Jul 23, 2015

This issue was moved to Polymer/polymer#2135 and it should be fixed once Polymer/polymer#2134 is merged.

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

No branches or pull requests

5 participants