-
Notifications
You must be signed in to change notification settings - Fork 216
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
jupyter iframe state: make it work properly #4727
Comments
This is even worse than I thought -- if you add a cell above a cell that is rendered using an iframe, then the iframe cell reloads. |
OK, I think the only way to fix this problem is to eliminate use of react-windowed for Jupyter entirely, unfortunately. This is a lot of work since everything related to scrolling has to get ret reimplemented again. It's ironic that cocalc uses react-windowed all over the place (e.g., in file listings, etc.,) and it works great, but it doesn't 100% solve the problem for Jupyter, which was the original reason I started using react-windowed. |
Fixed via a8e078b and adjacent commits. |
In CoCalc (probably because of react-windowed, even if set with a very large window size!), when you scroll something involving iframe output off the screen, then back on the screen, the iframe is re-rendered. Of course, this resets any state. It would be much better if all iframes for a jupyter notebook were kept in the DOM somehow, so that this re-rendering doesn't happen.
I'm calling this a bug, since it's clearly the intention of Jupyter classic that the iframe state is preserved.
Relevant code: smc-webapp/jupyter/output-messages/iframe.tsx
A good python3 example that uses an iframe and has state (zoom in on part of the plot):
The text was updated successfully, but these errors were encountered: