[wp-trac] [WordPress Trac] #31652: Drag/Drop Ordering of Media Does Not Work in Chrome on touch enabled devices
WordPress Trac
noreply at wordpress.org
Tue Oct 11 03:58:43 UTC 2016
#31652: Drag/Drop Ordering of Media Does Not Work in Chrome on touch enabled
devices
-----------------------------+---------------------------------------------
Reporter: dan.rossiter | Owner: adamsilverstein
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.7
Component: Media | Version: 4.1.1
Severity: critical | Resolution:
Keywords: has-patch | Focuses: ui, javascript, administration
needs-testing |
-----------------------------+---------------------------------------------
Comment (by adamsilverstein):
Replying to [comment:20 azaozz]:
> Re-testing it again and thinking I'd rather not have these thumbnails
draggable/sortable at all on a phone.
Thanks for reviewing. Good point, for small screens drag and drop could
make using the gallery harder, although its still probably useful on
larger screen phones.
The real issue is with touch screen devices with much larger screens that
take input by mouse or touch (or stylus), such as many recent windows
laptops or the iPad pro (these are becoming more common apparently). Our
current code does not enable sortable for gallery items for //any touch
enabled devices//, making the gallery //unsortable by mouse or touch// on
these devices. [attachment:31652.diff] addresses this issue alone (can you
please test that one as well?). Maybe we can also skip sortable here for
small viewports using JS to detect the viewport size?
> I was hoping we can stop using jquery-touch-punch as it is a 5 years
old quick hack for jQuery UI Mouse to somewhat make it work on touch
devices.
Isn't Touch Punch required to add touch event support for jQuery UI for
now? If anything touch devices of all sizes are becoming way more common.
As for [attachment:31652.2.diff] and the removal of the wp_is_mobile
check: the problem with relying on `wp_is_mobile` here is that it is
USER_AGENT specific and includes ipads and possibly other devices with
large screens and alternate input methods where drag and drop does work
well. Touch Punch already includes feature detection and will bail early
on non-touch devices. This deserves some testing across a variety of
devices... I have a hunch this will be helpful for users who currently
cannot sort galleries on their devices.
> A proper fix would probably be to show arrow buttons in the middle of
the thumbnails.
This is a great idea and could work similar to the move links on menus,
this would make it much easier to manage galleries for smaller screens.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31652#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list