Skip to content

Commit

Permalink
bug(tabulator): fix backspace with selection
Browse files Browse the repository at this point in the history
- backspace with selection deletes selection
  • Loading branch information
e11sy committed Jan 24, 2025
1 parent 80132f1 commit 419a391
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ListTabulator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,14 @@ export default class ListTabulator<Renderer extends ListRenderer> {
return;
}

/**
* Caret is at start of input in case of delete selection
* Then backspace should be handled as usual
*/
if ((isCaretAtStartOfInput(currentItem) && window.getSelection()?.isCollapsed === false)) {
return;
}

/**
* Prevent Editor.js backspace handling
*/
Expand Down

0 comments on commit 419a391

Please sign in to comment.