WordPress/gutenberg

NumberControl: Disable dragging on touch devices

Open

#38.865 geöffnet am 16. Feb. 2022

Auf GitHub ansehen
 (2 Kommentare) (3 Reaktionen) (0 zugewiesene Personen)JavaScript (3.893 Forks)batch import
Good First Issue[Package] Components[Status] In Progress[Type] Bug

Repository-Metriken

Stars
 (9.607 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 18T 1h) (406 gemergte PRs in 30 T)

Beschreibung

The drag-to-change-value gesture will not work nicely on touch devices unless we disable browser scrolling with touch-action: none.

There is a separate question of whether we really want this dragging gesture on touch devices, because there is no cursor affordance like on desktop. It’s also pretty easy to accidentally flick and change the value, when you just want to tap/move the caret or something.

I’m inclined to disable the drag gesture on touch devices.


Tested on iPhone (Mobile mode in DevTools has different behavior)

Contributor Guide