Open
Description
React version: 17.0.2
In Chrome, pasting triggers onPaste
and onBeforeInput
, with the nativeEvent
s ClipboardEvent
and TextEvent
respectively.
In Firefox, pasting only triggers onPaste
with nativeEvent
paste
.
If I'm not mistaken, this seems to be the code responsible for not triggering onBeforeInput
on native paste
events:
react/packages/react-dom/src/events/plugins/BeforeInputEventPlugin.js
Lines 328 to 331 in 27c9c95
React version: 17.0.2 and 18.0.0
17.0.2
https://codesandbox.io/s/condescending-cerf-e1qt9?file=/src/App.js
18.0.0
https://codesandbox.io/s/sparkling-sun-fylti?file=/src/App.js