jQuery UI with touchpunch not fully working -> outdated
Opened this issue · 6 comments
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?
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.
it might be linked to the issue with the no click events, see my comments in #306
It would be interesting to know if the latest version of my fork fixes this - https://github.com/RWAP/jquery-ui-touch-punch
@RWAP it's working. just tested. Thank you.
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!)