react icon indicating copy to clipboard operation
react copied to clipboard

Fix scroll event type

Open chirokas opened this issue 1 year ago • 4 comments

The scroll event type is Event, not UIEvent.

https://developer.mozilla.org/en-US/docs/Web/API/Element/scroll_event https://drafts.csswg.org/cssom-view/#eventdef-document-scroll

https://github.com/facebook/react/blob/a4939017ffe2e04a94efca0f48b661bc778a6fa4/packages/react-dom-bindings/src/events/plugins/SimpleEventPlugin.js#L142-L144

chirokas avatar Mar 10 '24 09:03 chirokas

Hi @chirokas!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

facebook-github-bot avatar Mar 10 '24 09:03 facebook-github-bot

Comparing: 706d95f486fbdec35b771ea4aaf3e78feb907249...ec18c3e06a310c53d108d724952a94063ea74c30

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 177.10 kB 177.06 kB = 55.20 kB 55.19 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 177.64 kB 177.60 kB = 55.53 kB 55.54 kB
facebook-www/ReactDOM-prod.classic.js = 594.34 kB 594.20 kB = 104.96 kB 104.95 kB
facebook-www/ReactDOM-prod.modern.js = 577.60 kB 577.46 kB = 102.02 kB 101.99 kB
test_utils/ReactAllWarnings.js Deleted 66.60 kB 0.00 kB Deleted 16.28 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
test_utils/ReactAllWarnings.js Deleted 66.60 kB 0.00 kB Deleted 16.28 kB 0.00 kB

Generated by :no_entry_sign: dangerJS against ec18c3e06a310c53d108d724952a94063ea74c30

react-sizebot avatar Mar 10 '24 09:03 react-sizebot

If there are any problems, please guide me. Thanks! @rickhanlonii @kassens

chirokas avatar Mar 20 '24 12:03 chirokas

This seems correct and I confirmed that at least in the simple case, we're setting view and detail on the event, which is always undefined: https://codesandbox.io/p/sandbox/romantic-babycat-77fgyp

But changing the event system has dragons so I'm not sure if this is a safe change, because it does change more than just the types.

rickhanlonii avatar Mar 24 '24 00:03 rickhanlonii

@eps1lon Could you take a look at this PR?

chirokas avatar Aug 12 '24 14:08 chirokas