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

swipe close after menu sheet disabling links #473

Open
markflashlight opened this issue Jan 14, 2013 · 9 comments
Open

swipe close after menu sheet disabling links #473

markflashlight opened this issue Jan 14, 2013 · 9 comments

Comments

@markflashlight
Copy link

If you click on a menusheet link, then swipe to close it, no links then work until you touch the screen once.

Thoughts?

@thomasyip
Copy link
Member

If your link match jqtouch's touch selector, the menu should be closed for you.

If you handling the link yourself, then, you need to manually call $('#id_of_your_menusheet').menusheet('hide').

@markflashlight
Copy link
Author

hmmm, all I know is when I downloaded the master and ran the main demo, this is the behavior I'm experiencing where a swipe close when the menu sheet is open, means the links don't work when first clicked and require a second click.

@thomasyip
Copy link
Member

Are you on iOS or Android?

@thomasyip thomasyip reopened this Jan 16, 2013
@devgeeks
Copy link
Contributor

If the menu is open, the whole page can be scrolled right to left... as long as your touchmove begins on the menusheet and not on the source. ie: dragging/scrolling the menusheet. If you touch the source, of course, the menusheet closes.

Then, once the total is scrolled so that the source is the only thing visible, it appears to be "closed" but is in fact still open... the first click "closes" the menusheet (offscreen) so your link doesn't fire.

I would like to see opening the menusheet not allow the total (menusheet + source) to be scrolled horizontally at all.

@thomasyip
Copy link
Member

Yes, I need to add the code to make sure any drag to the menusheet should close the sheet. It has not done.

@markflashlight, do you think @devgeeks described the problem you saw correctly? Or, was it another bug?

@devgeeks
Copy link
Contributor

I actually think maybe prevent dragging of the sheet, and stick with any touch (dragging or otherwise) to the source closing the sheet.

If I could have anything I would have the menusheet be openable via a drag like the Facebook one :)

@thomasyip
Copy link
Member

Yes, I like the current Facebook behavior as well.

The older Facebook behavior is dragging prevented and activates closing of menusheet.

However, getting drag prevented might not be as straight forward as it should be. It has been "funny" since iOS 5. If you "drag prevented" on a 100% height body, you simply drag the entire view port. For the limited time I was able to spend when iOS 5 came out, I couldn't figure out how to "drag prevent". Before iOS 5, it was simply $(body).bind('touchmove', function() { return false }), which no longer work. It might have since fixed, but I haven't tried or research on it recently.

@devgeeks
Copy link
Contributor

A quickie fix till one of us can figure something better:

https://gist.github.com/4600088

Just basically closes the menusheet if you drag the menusheet past the half way point.

@thomasyip
Copy link
Member

That's a reasonable workaround. If I can't come up with something better in a month, I will put it in. Better than confusing people.

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

No branches or pull requests

3 participants