[Bug] - Error during delete a block by index
See original GitHub issueI’ve installed the v2.18 to try the new feature about deleting specific block by index. I can notice that now I see a warning if I try to delete a block by an invalid index…ok, but now I see this error:
Instead, if I try to delete though the same code the firt element It seems work fine…
Cannot read property 'lastInput' of undefined
Steps to reproduce:
- Create a new editor instance
- As first block (for example), insert a paragraph with something write
- As second one insert a paragraph too
- call after adding the second one the following code:
this.api.blocks.getBlockByIndex(1);
Expected behavior: The block should be removed.
Screenshots:
main.js is the file where I call the delete function.
Device, Browser, OS: Chrome v83.0.4103.61, Windows 10
Editor.js version: 2.18
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Getting a "Fatal error: Index out … | Apple Developer Forums
I've debugged this through and through on Ventura and the element of the array I delete a receipt group from is deleted properly,...
Read more >46391 – java.io.IOException: Cannot remove block[ 11024 ]
I have customer file (included as attachment) that causes an java. io. IOException: Cannot remove block[ 11024 ]; out of range[ 0 -...
Read more >Error while creating index.html - Mobirise Forums
This last time, I was trying to use mbr-popupblock and I deleted it. The popup block is no longer appearing on my page...
Read more >How to remove bad blocks from the database using dbrpr
After running dbrpr, run a full index rebuild on the database. Having reformatted blocks and possibly deleted bad records either index entries ...
Read more >Why does deleting an allocated array cause a memory error?
The problem is in the insert method. When you are copying the existing elements up to make space for the new element, you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ranemihir I reproduce the issue with those steps :
editorInstance.blocks.delete(1)
(I use a button next to the editor to delete a specific blocks) Note that any valid index triggers the error, an invalid or missing id triggers a simple warningResolved by #1218