Skip to content

Commit

Permalink
fix: media element has lowercase event names
Browse files Browse the repository at this point in the history
  • Loading branch information
luwes committed May 26, 2024
1 parent e2c3fce commit edf28e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/build-react-wrapper/templates/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default React.forwardRef((allProps, ref) => {
for (let name in props) {
if (name[0] === 'o' && name[1] === 'n') {
const useCapture = name.endsWith('Capture');
const eventName = name.slice(2, useCapture ? name.length - 7 : undefined);
const eventName = name.slice(2, useCapture ? name.length - 7 : undefined).toLowerCase();
const callback = props[name];

useEffect(() => {
Expand Down

0 comments on commit edf28e1

Please sign in to comment.