WordPress/gutenberg

NumberControl: Disable dragging on touch devices

開放

#38,865 建立於 2022年2月16日

 (2 則留言) (3 個反應) (0 位負責人)JavaScript (3,893 個分叉)batch import
Good First Issue[Package] Components[Status] In Progress[Type] Bug

倉庫指標

星標
 (9,607 顆星)
PR 合併指標
 (平均合併 12天 18小時) (30 天內合併 509 個 PR)

描述

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)

貢獻者指南