Skip to content
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

Closing widgets leaves a small blank line #2880

Closed
e-dorigatti opened this issue May 20, 2020 · 2 comments
Closed

Closing widgets leaves a small blank line #2880

e-dorigatti opened this issue May 20, 2020 · 2 comments
Labels
resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.

Comments

@e-dorigatti
Copy link

This becomes noticeable in a loop. For example, run this in a notebook:

from ipywidgets import HTML
for i in range(5):
    c = HTML(f'it. <b>{i}</b>')
    display(c)
    if i < 4:
        c.close()

Even though the widgets are closed, the container is still there, with non-zero height:

Screenshot_20200520_102146_cropped

This is the HTML:

<!-- first four empty containers are like this -->
<div class="p-Widget p-Panel jp-OutputArea-child">
  <div class="p-Widget jp-OutputPrompt jp-OutputArea-prompt"></div>
  <div class="p-Widget p-Panel jupyter-widgets jp-OutputArea-output p-mod-hidden"></div>
</div>

<!-- last container with content --->
<div class="p-Widget p-Panel jp-OutputArea-child">
  <div class="p-Widget jp-OutputPrompt jp-OutputArea-prompt"></div>
  <div class="p-Widget p-Panel jupyter-widgets jp-OutputArea-output">
    <div class="p-Widget jupyter-widgets widget-inline-hbox widget-html">
      <label class="widget-label" style="display: none;" title=""></label>
      <div class="widget-html-content">it. <b>4</b></div>
    </div>
  </div>
</div>
@e-dorigatti
Copy link
Author

Guess this is a duplicate of #1845. Sorry.

@jasongrout
Copy link
Member

Guess this is a duplicate of #1845. Sorry.

Yes. It's a difficult problem because we're working around things in the notebook paradigm.

@lock lock bot added the resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Jun 24, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

No branches or pull requests

2 participants