executablebooks / sphinx-thebe

A Sphinx extension to convert static code into interactive code cells with Jupyter, Thebe, and Binder.
https://sphinx-thebe.readthedocs.io/en/latest/
MIT License
28 stars 15 forks source link

Code blocks inside .. collapse:: directives are sometimes displayed without text #61

Open DSSAtDatagen opened 1 year ago

DSSAtDatagen commented 1 year ago

Describe the bug

context I place thebe code blocks inside .. collapse:: directives on a regular basis.

expectation I expect the code block to act the same way as any other code block.

bug But instead - and on Firefox browsers only - the input section of the code block has no text in it.

This only happens if the kernel is activated before you open the collapsed section of the page. And it only happens on Firefox; it does not happen on Edge or Chrome

Reproduce the bug

  1. Create a ..collapse::directive and put a thebe-enabled .. code-block:: inside of it.
  2. Build
  3. Open the page in Firefox 108.0.2 (the latest version, though this has been an issue for some time)
  4. Activate the kernel
  5. Open the collapse directive
  6. Notice that the input block is blank.
  7. Click in the input block and the text that should be there suddenly appears.

Example of a blank input block that actually has text in it: image

List your environment

I'm using Firefox 108.0.2 on Windows 10.

sphinx-thebe: 0.1.2 myst-parser: 0.15.2 sphinx: 4.5.0 docutils: 0.17.1

welcome[bot] commented 1 year ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada: