Skip to content

Commit

Permalink
Fixes #846 Backspace removes empty blocks (#854)
Browse files Browse the repository at this point in the history
* Fixes backspace remove empty block

* rename data to event
  • Loading branch information
Dammmien authored and erquhart committed Nov 30, 2017
1 parent 28924ee commit 2e7e66d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ const BreakToDefaultBlockOpts = {
export const BreakToDefaultBlockConfigured = BreakToDefaultBlock(BreakToDefaultBlockOpts);

const BackspaceCloseBlock = (options = {}) => ({
onKeyDown(e, data, change) {
if (data.key != 'backspace') return;
onKeyDown(event, change) {
if (event.key !== 'Backspace') return;

const { defaultBlock = 'paragraph', ignoreIn, onlyIn } = options;
const { startBlock } = change.value;
Expand Down

0 comments on commit 2e7e66d

Please sign in to comment.