Skip to content

Output widget deletes all output if display takes longish #3986

Open
@soerenwolfers

Description

@soerenwolfers

If I display an ipywidget Output widget as follows:

import plotly.express as px
from ipywidgets import Output
widget = Output()
widget

and then try to fill it with content as follows:

a = list(range(50_000))
with widget:
    display(px.line(a, a))

the contents disappear after a short time. After running the second cell for a second time, the output persists as expected.

This issue disappears if the display call is fast enough; for example, when I reduce the number of points from 50_000 to 5.

The issue happens in both regular JupyterLab and the JupyterLab Notebook interface. It happens in both Chrome and Firefox.

Versions:
ipywidgets==8.1.6
IPython=9.1.0
plotly==6.0.1
jupyterlab==4.4.1
jupyterlab-widgets==3.0.14

disappearing.webm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions