[Bug] Error thrown when modifying text, yes I know it's vague :(
We got a report from Sentry that one of our user got a bug when modifying a text.
TypeError
Cannot read property 'inputs' of undefined
{snip} election){var e=this.Editor.BlockManager.getBlock(t.target).inputs;e.length>1&&!this.readyToBlockSelection?this.readyToBlockSelection=!0:1!= {snip}
I cannot reproduce it as I don't know how it got triggered.
Yet I know the last user action:
ui.click | div.ce-block__content > div.ce-paragraph.cdx-block
Browser : Chrome Version: 81.0.4044 Computer : Macbook pro with Mac OS X Version:10.14.6
Editor.js version and plugins you use with their versions:
"@editorjs/checklist": "^1.1.0",
"@editorjs/editorjs": "^2.17.0",
"@editorjs/embed": "^2.3.1",
"@editorjs/header": "^2.4.1",
"@editorjs/image": "^2.3.4",
"@editorjs/link": "^2.1.3",
"@editorjs/list": "^1.4.0",
"@editorjs/marker": "^1.2.2"
Can you provide more details regarding the error?
It seems this error is occured in blockSelection.ts.
When multiple Editor.js instances are launched, this error can be occured by Ctrl + A (Select All Command),
Provide proper steps for reproducing the error. @vincentdesmares
don't know what tooling you use when writing the code for the library, but as getBlock() might return undefined, you should not chain its call with property access/method call. i get the same error described by the author of this thread in handleCommandA() where you rely on getBlock() returning value based on event.target which is really unpredictable in general