[wp-trac] [WordPress Trac] #52926: mobile compatibility library sortable list input field ignores touch event
WordPress Trac
noreply at wordpress.org
Sat Mar 27 14:53:05 UTC 2021
#52926: mobile compatibility library sortable list input field ignores touch event
-----------------------------+---------------------------------------------
Reporter: edtorrey | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: External | Version: 5.7
Libraries |
Severity: normal | Resolution:
Keywords: | Focuses: ui, javascript, administration
-----------------------------+---------------------------------------------
Comment (by whiteshadow):
@sabernhardt Those inputs are read-only for preexisting menu items, like
items that are part of WordPress core. To edit those fields, you'll need
to either create a new item or change "Target page" to "Custom URL".
Yes, I think it is the "Touch Punch" library. The menu item list uses
jQuery UI Sortable and it seems to interact with Touch Punch in such a way
that inputs that are inside the draggable elements can't be focused by
clicking/tapping them.
During my debugging I found that removing the `touchstart` event handler
from the sortable container fixed the focus issue. As far as I can tell,
Touch Punch automatically adds touch event handlers when something else
registers a `mousedown` event (among others). Of course, removing the
event handler breaks dragging/sorting, so it's not really a proper
solution.
I tried a couple of forks of the Touch Punch library but they didn't seem
to help with this particular problem.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52926#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list