codex-team / editor.js

A block-style editor with clean JSON output
https://editorjs.io
Apache License 2.0
28.72k stars 2.08k forks source link

Backspace is not working in version 2.28.0 #2793

Open naveed-eutech opened 3 months ago

naveed-eutech commented 3 months ago

when pressing backspace on EditorJS version 2.28.0, the key doesn't do anything.

WolfBearGames commented 3 months ago

I might have a related problem: In lists and in tables hitting backspace or delete sometimes moves the caret to a different list item or table cell instead of deleting. The problem seems to only happen when backspace/delete is the first key one hits, when newly focussing something. After typing a letter backsapce/delete seem to work correctly.

naveed-eutech commented 3 months ago

For us, it doesn't seem to work anytime. When we are typing new text and press backspace, the backspace space key just doesn't work. We tried adding an event-handler to catch the backspace key press and remove blocks from data array. But its just removes focus from editor, and one has to click on editor back to start entering text.

naveed-eutech commented 3 months ago

It turned out to be a parent window blocking the backspace event. We did a window.removeAllEventListeneres() to remove all events from the window object, and backspace started to work. Still wondering why backspace was working on other input elements on the same page.