Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed nodeRef prop type for cross-frame elements #732

Merged
merged 1 commit into from
May 29, 2021

Conversation

Andarist
Copy link
Contributor

Demo of the problem (and the fix if you uncomment it) presented here: https://codesandbox.io/s/naughty-dan-zps3f?file=/src/App.js

Simple instanceof checks always fail for cross-realm checks as technically each realm gets its own, pristine, environment which includes all global constructors (such as Element)

Copy link
Member

@koba04 koba04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Andarist
👍 Thank you! This looks good to me. Could you fix ESLint errors to pass the CI?

@Andarist Andarist force-pushed the fix/cross-frame-node-ref-prop-type branch from 77bec9b to f2d48ac Compare May 29, 2021 13:48
@Andarist
Copy link
Contributor Author

@koba04 I think it will pass now - if not I will come back to it some time later

Copy link
Member

@koba04 koba04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@koba04 koba04 merged commit 8710c01 into reactjs:master May 29, 2021
@koba04
Copy link
Member

koba04 commented May 29, 2021

@Andarist Thank you for your fix!

jquense pushed a commit that referenced this pull request May 29, 2021
## [4.4.2](v4.4.1...v4.4.2) (2021-05-29)

### Bug Fixes

* `nodeRef` prop type for cross-realm elements ([#732](#732)) ([8710c01](8710c01))
@jquense
Copy link
Collaborator

jquense commented May 29, 2021

🎉 This PR is included in version 4.4.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Andarist Andarist deleted the fix/cross-frame-node-ref-prop-type branch May 29, 2021 20:23
@oliviertassinari
Copy link
Contributor

oliviertassinari commented May 29, 2021

Yes! Happy to see this long-standing issue fixed :).

As a side note, on MUI, we fixed it by testing prop.nodeType !== 1.

johnfrench3 pushed a commit to johnfrench3/transition-group-react that referenced this pull request Nov 2, 2022
## [4.4.2](reactjs/react-transition-group@v4.4.1...v4.4.2) (2021-05-29)

### Bug Fixes

* `nodeRef` prop type for cross-realm elements ([#732](reactjs/react-transition-group#732)) ([8710c01](reactjs/react-transition-group@8710c01))
patrickm68 added a commit to patrickm68/react-transition-group-developer that referenced this pull request Dec 1, 2022
## [4.4.2](reactjs/react-transition-group@v4.4.1...v4.4.2) (2021-05-29)

### Bug Fixes

* `nodeRef` prop type for cross-realm elements ([#732](reactjs/react-transition-group#732)) ([8710c01](reactjs/react-transition-group@8710c01))
shaikdev2 pushed a commit to shaikdev2/transition-group-react that referenced this pull request Jun 9, 2023
## [4.4.2](reactjs/react-transition-group@v4.4.1...v4.4.2) (2021-05-29)

### Bug Fixes

* `nodeRef` prop type for cross-realm elements ([#732](reactjs/react-transition-group#732)) ([8710c01](reactjs/react-transition-group@8710c01))
GreenCat1996 added a commit to GreenCat1996/react-transition-group that referenced this pull request Aug 1, 2023
## [4.4.2](reactjs/react-transition-group@v4.4.1...v4.4.2) (2021-05-29)

### Bug Fixes

* `nodeRef` prop type for cross-realm elements ([#732](reactjs/react-transition-group#732)) ([8710c01](reactjs/react-transition-group@8710c01))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants