报错Unable to preventDefault inside passive event listener invocation.
React中使用antd的select报错
Unable to preventDefault inside passive event listener invocation.`
1卸载default-passive-events
但是此时会报警告useTouchMove.js:154 [Violation] Added non-passive event listener to a scroll-blocking ‘wheel’ event. Consider marking event handler as ‘passive’ to make the page more responsive.
注释掉react-dom.development中的第6202行代码
文件路径:
node_modules/react-dom/cjs/react-dom.development.js
if (event.preventDefault) {
//注释掉下面这行
//event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE
} else if (typeof event.returnValue !== 'unknown') {
event.returnValue = false;
}