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 Sortable #17

Open
hirenshah opened this issue Apr 30, 2020 · 6 comments
Open

jQuery UI Sortable #17

hirenshah opened this issue Apr 30, 2020 · 6 comments

Comments

@hirenshah
Copy link

I came across this after researching a fix for WordPress jQuery UI Sortable not actually being sortable on mobile devices (trying to tap and drag it does nothing).

If I use a mouse, (I paired a BlueTooth one to my phone), all the click events work as expected.

I've tried swapping out WP's default jQuery, TouchPunch etc newer versions, but that didn't help in any way.

Is there anything I'm overlooking here?

@RWAP
Copy link
Owner

RWAP commented Apr 30, 2020

Did you use the latest jquery ui and this version of touchpunch - not the one from the main furf repository (which has not been updated in years)?

It works fine for others, so it might be something in the Wordpress plugin - ensure you are also loading in the correct order:

JQuery
JQuery UI
TouchPunch

@hirenshah
Copy link
Author

Yes, I am using the latest version of jQuery UI (I have deregistered the WP versions and registered the new version), as well as done the same for TouchPunch.

I've set the function priorities so that TouchPunch is loaded last, but it doesn't seem to have helped.

Would you be able to suggest how I can confirm they are being loaded in the correct order?

@RWAP
Copy link
Owner

RWAP commented Apr 30, 2020

Sorry - am not sure - does the browser console reveal anything?

It could of course be another plugin which may be preventing touchpunch

@hirenshah
Copy link
Author

I've been faffing around with this for days now. I've ensured that it is being loaded right at the end, especially after 'jquery-ui-mouse'.

I'm experiencing this issue with the ACF Gallery field, so have been talking to ACF's developers. The field has actions for both tap (opens a sidebar) as well as hold and drag for sorting. When you first load the page, you can tap, which opens a side panel. If you close the side panel, you can no longer tap to reopen it, but you can still sort items.

It sounds like an ACF issue, but I'm confused as to why when using a mouse with my phone, the interaction is as you would expect.

By simply implementing this version of TouchPunch (and nothing else), the behaviour changes. I am no longer able to hold and drag (at all), but the tap to open the side panelworks perfectly every time.

I did look into updating jQuery UI but WordPress has all the UI and Effects components registered separately and it seems overly complicated to deregister all of them, and re-register in the correct order :(

@RWAP
Copy link
Owner

RWAP commented Mar 14, 2021

Did you manage to resolve this issue?

@mbrandt00
Copy link

I'm having a similar issue here.

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