Table cell keeps info about drawing even if image is gone #2405

Open
opened 2026-02-05 03:58:46 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @kmpm on GitHub (Sep 27, 2021).

Describe the bug
Information about previous drawing is kept in table cell even after image is deleted.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Create a table. I am using a single cell in this example
  2. Select the cell
  3. Click the Drawing button, draw something and click Save
  4. Select the rendered image (png).
  5. Delete the image ( I am using the Delete key on the keyboard)
  6. Click the Drawing button to add a new drawing.
  7. Draw.io opens but with the old, deleted, drawing

Expected behavior
I expect to start a new empty drawing.

Your Configuration (please complete the following information):

Additional context
Add any other context about the problem here.
Probably related to #1304

Page source before and after image is deleted.

before

<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 100%;">
<div drawio-diagram="185"><img id="image-bc2775daa2932" src="https://my-sitename.here/uploads/images/drawio/2021-09/drawing-3-1632744166.png" /></div>
</td>
</tr>
</tbody>
</table>

after


<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 100%;">
<div drawio-diagram="185"></div>
</td>
</tr>
</tbody>
</table>

It looks as if a div is inserted that has a drawio-diagram that keeps information about what diagram should be contained within.
If I click the Drawing button again when the table cell is selected I get to open the existing drawing, i can even edit and save changes, but nothing shows up in the cell again.

Can be worked around by editing the source and remove the div.

Originally created by @kmpm on GitHub (Sep 27, 2021). **Describe the bug** Information about previous drawing is kept in table cell even after image is deleted. **Steps To Reproduce** Steps to reproduce the behavior: 1. Create a table. I am using a single cell in this example 2. Select the cell 3. Click the __Drawing__ button, draw something and click __Save__ 4. Select the rendered image (png). 5. Delete the image ( I am using the Delete key on the keyboard) 6. Click the __Drawing__ button to add a new drawing. 7. Draw.io opens but with the old, deleted, drawing **Expected behavior** I expect to start a new empty drawing. **Your Configuration (please complete the following information):** - BookStack v21.05.4 - PHP Version: 7.x - Hosting Method (Nginx/Apache/Docker): Docker, https://docs.linuxserver.io/images/docker-bookstack **Additional context** Add any other context about the problem here. Probably related to #1304 Page source before and after image is deleted. _before_ ```html <table style="border-collapse: collapse; width: 100%;" border="1"> <tbody> <tr> <td style="width: 100%;"> <div drawio-diagram="185"><img id="image-bc2775daa2932" src="https://my-sitename.here/uploads/images/drawio/2021-09/drawing-3-1632744166.png" /></div> </td> </tr> </tbody> </table> ``` _after_ ```html <table style="border-collapse: collapse; width: 100%;" border="1"> <tbody> <tr> <td style="width: 100%;"> <div drawio-diagram="185"></div> </td> </tr> </tbody> </table> ``` It looks as if a `div` is inserted that has a `drawio-diagram` that keeps information about what diagram should be contained within. If I click the __Drawing__ button again when the table cell is selected I get to open the existing drawing, i can even edit and save changes, but nothing shows up in the cell again. Can be worked around by editing the source and remove the div.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2405