[An error occurred when table toggle orderedList]The first row of a cell in the table cannot be executed toggleOrderedList
or toggleBulletList
#2279
Labels
Type: Bug
The issue or pullrequest is related to a bug
What’s the bug you are facing?
Uncaught RangeError: Index 1 out of range for <table(tableRow(tableHeader(orderedList(listItem(paragraph("cccs"))), paragraph("sczffsef")), tableHeader(paragraph), tableHeader(paragraph), tableHeader(paragraph), tableHeader(paragraph)), tableRow(tableCell(paragraph), tableCell(paragraph), tableCell(paragraph), tableCell(paragraph), tableCell(paragraph)), tableRow(tableCell(paragraph), tableCell(paragraph), tableCell(paragraph), tableCell(paragraph), tableCell(paragraph)), tableRow(tableCell(paragraph), tableCell(paragraph), tableCell(paragraph), tableCell(paragraph), tableCell(paragraph)))>
at Fragment2.child (fragment.js:159)
at Fragment2.findIndex (fragment.js:205)
at Node2.nodeAt (node.js:189)
at joinListBackwards (toggleList.ts:17)
at toggleList.ts:114
at command.ts:15
at Object.chainedCommand [as command] (CommandManager.ts:92)
at toggleList.ts:114
at Object.toggleList (CommandManager.ts:149)
at ordered-list.ts:69
How can we reproduce the bug on our side?
<button onClick={() => editor.chain().focus().toggleBulletList().run()} className={
show-button ${editor.isActive('bulletList') ? 'act' : ''}} > <IconFont className="icon " type='num_less'/> </button>
After the second row, it's ok
Can you provide a CodeSandbox?
CodeSandbox :https://codesandbox.io/s/nostalgic-surf-x0mzj?file=/src/App.js
What did you expect to happen?
select a tablecell
click
toggleOrderedList
Anything to add? (optional)
No response
Did you update your dependencies?
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: