attoae / quill-table-better

A module that enhances the table functionality of Quill.
MIT License
59 stars 5 forks source link

An error occurs when pressing the right arrow key, left arrow key, etc. #2

Closed tqkqt0 closed 3 months ago

tqkqt0 commented 4 months ago

An error occurs when pressing the right arrow key, left arrow key, etc. This can also be reproduced in CodePen. Since it occurs when pressing the key without inserting a table, a null check may be necessary.


×
ERROR
Cannot read properties of null (reading 'next')
TypeError: Cannot read properties of null (reading 'next')
    at ht.makeTableArrowLevelHandler (http://localhost:3000/static/js/bundle.js:167359:18)
    at ht.handleKeyup (http://localhost:3000/static/js/bundle.js:167322:22)
    at Ve.handleKeyup (http://localhost:3000/static/js/bundle.js:170360:30)
ERROR
Cannot read properties of null (reading 'prev')
TypeError: Cannot read properties of null (reading 'prev')
    at ht.makeTableArrowLevelHandler (http://localhost:3000/static/js/bundle.js:167359:18)
    at ht.handleKeyup (http://localhost:3000/static/js/bundle.js:167322:22)
    at Ve.handleKeyup (http://localhost:3000/static/js/bundle.js:170360:30)
ERROR
Cannot read properties of null (reading 'parent')
TypeError: Cannot read properties of null (reading 'parent')
    at ht.makeTableArrowVerticalHandler (http://localhost:3000/static/js/bundle.js:167370:30)
    at ht.handleKeyup (http://localhost:3000/static/js/bundle.js:167326:22)
    at Ve.handleKeyup (http://localhost:3000/static/js/bundle.js:170360:30)```
attoae commented 3 months ago

This problem occurs when the table is incomplete. Did you delete the cells in some way?

tqkqt0 commented 3 months ago

This occurs even when there is no table. Currently, in my environment, this does not occur if I delete the following:

"table-better": {
language: l,
menus: ["column", "row", "merge", "wrap"],
},

It seems to occur if I add modules.

attoae commented 3 months ago

I will release the next version in the next two days and fix this issue.

tqkqt0 commented 3 months ago

Thank you. I'm looking forward to it.