-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
iframe example - use an onLoad callback instead of the ref #4758
Conversation
|
Just to make sure, it would not be possible to pass in |
Yes. I don't think this is needed for this example. |
@adrid, this change has broken our integration test. Any chance you have time to update the test to reflect the change in the example?
|
@dylans when I created the pull request it was not passing this test and I noticed that later - the same thing what you pointing out. I've already fixed it here in the next commit 87a8604 I've tested on the main branch (as all those commits are merged) and seems to be okay so maybe you referring to some check before I fixed that? |
…aylor#4758) * use an onLoad callback instead of the ref * expect body to not be null on the iframe test * remove onLoad prop
Description
Makes the iframe example work on the Firefox and keeps it working on other browsers. It changes using the ref on the iframe to an
onLoad
event solutionIssue
Fixes: #4285
Example
https://www.slatejs.org/examples/iframe on the Firefox
Context
Firefox resets the iframe content on the load event. I've tested on some older versions of the browser and it keeps happening too. Here is an issue on the react repo facebook/react#22847
Checks
yarn test
.yarn lint
. (Fix errors withyarn fix
.)yarn start
.)