Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Feature Request: Swipeup and Swipedown #1669

Closed
@VTWoods

Description

@VTWoods
Contributor

There is alot of helpful code in jquery.mobile.event.js for interpreting swipe events. However, if you want to catch a swipeup or swipedown event you have to recreate the swiperight and swipeleft logic. I wrote a patch that added swipe up and swipe down to the supported events. However, I was not sure if these events were not included intentionally. If this is a feature that the devs are interested, I could initiate a pull request.

Activity

VTWoods

VTWoods commented on May 20, 2011

@VTWoods
ContributorAuthor

This change enabled me to create a "remote control" web app that allowed me to send up, down, left, and right signals to a server.

For reference:
https://github.com/VTWoods/jquery-mobile/blob/touchEvents/js/jquery.mobile.event.js

If there is a better way to pass around the start and stop information, I would be happy to make the modification.

toddparker

toddparker commented on May 20, 2011

@toddparker
Contributor

So this could only be used on an app that doesn't have scrolling, right? The up/down swipe would kill that.

VTWoods

VTWoods commented on May 20, 2011

@VTWoods
ContributorAuthor

In my application I had a blank page with touchmove default disabled.

VTWoods

VTWoods commented on May 20, 2011

@VTWoods
ContributorAuthor

I tested my change without touchmove disabled and the swipeup and swipedown are still fired properly.

VTWoods

VTWoods commented on May 22, 2011

@VTWoods
ContributorAuthor

Instead of adding swipeup and swipedown, the swipe event could be triggered for any swipe motion with the movement info added as event parameters.

toddparker

toddparker commented on May 23, 2011

@toddparker
Contributor

Cool. I don't think this will be considered for 1.0 so could you add a link to this issue from the feature request wiki page, then close this issue for now? Thanks!

VTWoods

VTWoods commented on May 23, 2011

@VTWoods
ContributorAuthor

Yup no problem.

emilesilvis

emilesilvis commented on Nov 7, 2012

@emilesilvis

Was this ever implemented?

mrextreme

mrextreme commented on Nov 25, 2014

@mrextreme

This feature is badly missing. "pull down to refresh", to name the most important of all of the use cases. It is practically an expected behaviour since Twitter and Facebook made is popular and widely used, and that's exactly what I would need to implement now, for that very reason. None of the 3rd party swipe event solutions work properly, they block or clog the event chain badly, don't work at all or make scrolling choppy.

arschmitz

arschmitz commented on Nov 28, 2014

@arschmitz
Contributor

@mrextreme swipeup and down are very different then pull to refresh. Pull to refresh would require a draggable implementation to do properly. Also the reason none of the 3rd party solution work well is because with the current state of Touch / Pointer events in many browsers this is not possible to do in a cross browser way with out the issues you mention. There is a lot of discussion about this and the issues surrounding it in the pointer events working group. Things like the facebook app are using native events which make this possible to do smoothly.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @toddparker@arschmitz@emilesilvis@VTWoods@trgraglia

        Issue actions

          Feature Request: Swipeup and Swipedown · Issue #1669 · jquery-archive/jquery-mobile