react-mobile-picker
react-mobile-picker copied to clipboard
event.preventDefault() passive
你好,提了个PR https://github.com/adcentury/react-mobile-picker/pull/26
背景:react onTouchMove 里不能 event.preventDefault(),原因 https://www.chromestatus.com/features/5093566007214080 ,event.preventDefault() 不起作用,导致 页面其他地方也跟着 move,体验不好
可以运行demo,控制台报
猜测 react 内部对事件 passive:true 了 (但我没找到相关代码)
修复:使用原生的事件
Same issue here... this component doesn't work
Simply add the following CSS
.picker-scroller { touch-action: none; }
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.