froala / vue-froala-wysiwyg

Vue component for Froala WYSIWYG HTML Rich Text Editor.
https://froala.com/wysiwyg-editor
633 stars 86 forks source link

Uncaught TypeError: Cannot read properties of null (reading 'parentElement') #216

Open jes490 opened 1 year ago

jes490 commented 1 year ago

Steps to reproduce

  1. Insert this HTML into Code View
<table border="0" cellpadding="0" cellspacing="0" width="608">
    <tbody>
        <tr>
            <td height="20" width="54.76973684210526%">
                <br>
            </td>
            <td class="xl68" colspan="3" width="45.23026315789474%">ROW</td>
        </tr>
        <tr>
            <td height="20">
                <br>
            </td>
            <td>Max feasible</td>
            <td>Completes</td>
            <td>CPI</td>
        </tr>
        <tr>
            <td class="xl66" height="20">11111</td>
            <td align="right">12345</td>
            <td>
                <br>
            </td>
            <td align="right" class="xl67">12345</td>
        </tr>
        <tr>
            <td class="xl66" height="20">22222</td>
            <td align="right">12345</td>
            <td align="right">12345</td>
            <td align="right" class="xl67">12345</td>
        </tr>
        <tr>
            <td class="xl66" height="20">33333</td>
            <td align="right">12345</td>
            <td align="right">12345</td>
            <td align="right" class="xl67">12345</td>
        </tr>
        <tr>
            <td class="xl66" height="20">44444</td>
            <td align="right">12345</td>
            <td align="right">12345</td>
            <td align="right" class="xl67">12345</td>
        </tr>
    </tbody>
</table>

<p>One two three</p>
  1. Switch to editor view
  2. Select the whole table (only the table, without last paragraph)
  3. Press delete/backspace

Table will be deleted, but you will get an error Uncaught TypeError: Cannot read properties of null (reading 'parentElement')

This happens on froala main page too, so can easily try it here: https://froala.com/wysiwyg-editor/demo/