Closed c-dante closed 4 years ago
Did you try with Preact X? preact-compat
has moved into core and is available under the preact/compat
import. It has much better compatibility than this library here, which is written for Preact 8.
Yep! I can make the issue there -- didn't realize it was a separate repo.
Out build was using:
"preact": "^10.0.0",
with the wp alias:
alias: {
// preact-compat
'react': 'preact/compat',
"react-dom/test-utils": "preact/test-utils",
'react-dom': 'preact/compat', // Must be below test-utils
// Not necessary unless you consume a module using `createClass`
'create-react-class': 'preact/compat/lib/create-react-class',
// Not necessary unless you consume a module requiring `react-dom-factories`
'react-dom-factories': 'preact/compat/lib/react-dom-factories',
},
Closing this issue out -- the bugs are already reported in preact
FYI: The create-react-class
and react-dom-factories
aliases are not needed anymore. They were only present in React <0.14
.
Looks like the material-ui/core/Select modifies the
target
on a native event.Seems they're also doing it on item click: https://github.com/mui-org/material-ui/blob/cdc4b98b62b43d4e7253f731f2028e45d669acf5/packages/material-ui/src/Select/SelectInput.js#L129
Browsers throw an error since the event is marked read-only.
I noticed there is some work to use non-synthetic events in preact-compat -- is there a way to configure it in certain cases?