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

jQuery UI with touchpunch not fully working -> outdated #317

Open
Johnny99211 opened this issue Jun 3, 2019 · 6 comments
Open

jQuery UI with touchpunch not fully working -> outdated #317

Johnny99211 opened this issue Jun 3, 2019 · 6 comments

Comments

@Johnny99211
Copy link

I'm currently trying to get the jQuery UI sortable function working on my Android phone (touch). Sadly, the touch event don't works on my phone. I've tried everything.

jQuery("#details-inner").sortable({
    handle: ".sort-section-handle",
    axis: "y",
    placeholder: "sort-placeholder",
    update: function (e, r) {
        var a = {action: "update_element_position", sec: jQuery(r.item).attr("data-section"), pos: r.item.index()};
        jQuery.post(cm_ajaxurl, a)
    }
});

jQuery("#details-inner .sort-section-handle").disableSelection();

I've included jQuery UI and also jQuery UI Touch Punch for the mobile touch support within WordPress this way:

wp_enqueue_script( 'jquery-ui-sortable' );
wp_enqueue_script( 'jquery-touch-punch' );

On the computer everything works great but not on my phone. On the phone it's scrolling the page when I'm trying to press the handle to move the section. Any idea what could be the problem? Maybe the handle?

@Johnny99211 Johnny99211 changed the title jQuery UI with Touchpunch not fully working jQuery UI with touchpunch not fully working Jun 3, 2019
@Johnny99211
Copy link
Author

I've tried out a very old jQuery UI version and it looks like that touchpunch don't works anymore with newer versions because with a really old version 1.8.21 it's working but also not that good because sorting with a handle don't works.

@Johnny99211 Johnny99211 changed the title jQuery UI with touchpunch not fully working jQuery UI with touchpunch not fully working -> outdated Jun 3, 2019
@dexterial
Copy link

it might be linked to the issue with the no click events, see my comments in #306

@RWAP
Copy link

RWAP commented Jul 6, 2019

It would be interesting to know if the latest version of my fork fixes this - https://github.com/RWAP/jquery-ui-touch-punch

@vudayagirivaibhav
Copy link

@RWAP it's working. just tested. Thank you.

@kashemali
Copy link

Capture
When I try to move the dialog throw this error. Hope this would help you to solve the problem asap.

@RWAP
Copy link

RWAP commented Mar 2, 2020

Capture
When I try to move the dialog throw this error. Hope this would help you to solve the problem asap.

Suggest you try the latest code - NOT this old code which has not been updated in severeal years.

https://github.com/RWAP/jquery-ui-touch-punch

If the latest code does not work then you need to open a NEW issue with details of the browser you are using etc.... Don't hijack another issue (which has actually been marked as complete!)

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

5 participants