-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
nbagg: Use OutputArea event to trigger figure close. #18454
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
Conversation
When converting from jQuery to vanilla JavaScript, the trigger for the figure closure was set to a non-existent event name, as the 'remove' event is jQuery-specific. As there is no DOM node removal event (unless using MutationObserver), connect this handler to the notebook's `Cell` `OutputArea`'s 'cleared' event. This is triggered both by re-running a cell, and by using the Clear Output menu option. Fixes matplotlib#18447.
|
I pushed a (hopefully safe) pin for nbconvert, so we can fix CI as well. |
Checked this manually and it work is both brave (chrome-derivative) and firefox. |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon! If these instruction are inaccurate, feel free to suggest an improvement. |
FIX: Use OutputArea event to trigger figure close in nbagg
PR Summary
When converting from jQuery to vanilla JavaScript, the trigger for the figure closure was set to a non-existent event name, as the 'remove' event is jQuery-specific.
As there is no DOM node removal event (unless using MutationObserver), connect this handler to the notebook's
Cell
OutputArea
's 'cleared' event. This is triggered both by re-running a cell, and by using the Clear Output menu option.Fixes #18447.
PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
andpydocstyle<4
and runflake8 --docstring-convention=all
).doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).