react-mobile-picker icon indicating copy to clipboard operation
react-mobile-picker copied to clipboard

event.preventDefault() passive

Open liyatang opened this issue 5 years ago • 2 comments

你好,提了个PR https://github.com/adcentury/react-mobile-picker/pull/26

背景:react onTouchMove 里不能 event.preventDefault(),原因 https://www.chromestatus.com/features/5093566007214080 ,event.preventDefault() 不起作用,导致 页面其他地方也跟着 move,体验不好

可以运行demo,控制台报

image

猜测 react 内部对事件 passive:true 了 (但我没找到相关代码)

修复:使用原生的事件

liyatang avatar Nov 01 '18 16:11 liyatang

Same issue here... this component doesn't work

RRicardotj avatar May 13 '20 20:05 RRicardotj

Simply add the following CSS

.picker-scroller { touch-action: none; }

thijssmudde avatar May 17 '22 08:05 thijssmudde

Since I haven't received any updates or responses regarding this issue for the past 6 months, I have closed it. However, if you encounter the same issue again or have any new information to share, please don't hesitate to reopen this issue or create a new one.

Meanwhile, contributions are always welcome.

adcentury avatar Apr 03 '23 04:04 adcentury