Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit58e9740

Browse files
authored
Merge pull request#18665 from meeseeksmachine/auto-backport-of-pr-18639-on-v3.3.x
Backport PR#18639 on branch v3.3.x (nbagg: Don't close figures for bubbled events.)
2 parentsab11910 +29139a1 commit58e9740

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎lib/matplotlib/backends/web_backend/js/nbagg_mpl.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ mpl.mpl_figure_comm = function (comm, msg) {
4848
console.error('Failed to find cell for figure',id,fig);
4949
return;
5050
}
51-
fig.cell_info[0].output_area.element.one(
51+
fig.cell_info[0].output_area.element.on(
5252
'cleared',
5353
{fig:fig},
5454
fig._remove_fig_handler
@@ -181,6 +181,10 @@ mpl.figure.prototype._init_toolbar = function () {
181181

182182
mpl.figure.prototype._remove_fig_handler=function(event){
183183
varfig=event.data.fig;
184+
if(event.target!==this){
185+
// Ignore bubbled events from children.
186+
return;
187+
}
184188
fig.close_ws(fig,{});
185189
};
186190

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp