We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab11910 commit 29139a1Copy full SHA for 29139a1
lib/matplotlib/backends/web_backend/js/nbagg_mpl.js
@@ -48,7 +48,7 @@ mpl.mpl_figure_comm = function (comm, msg) {
48
console.error('Failed to find cell for figure', id, fig);
49
return;
50
}
51
- fig.cell_info[0].output_area.element.one(
+ fig.cell_info[0].output_area.element.on(
52
'cleared',
53
{ fig: fig },
54
fig._remove_fig_handler
@@ -181,6 +181,10 @@ mpl.figure.prototype._init_toolbar = function () {
181
182
mpl.figure.prototype._remove_fig_handler = function (event) {
183
var fig = event.data.fig;
184
+ if (event.target !== this) {
185
+ // Ignore bubbled events from children.
186
+ return;
187
+ }
188
fig.close_ws(fig, {});
189
};
190
0 commit comments