Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

Commit

Permalink
Backspace won't trigger delete event (Reopened) (#427)
Browse files Browse the repository at this point in the history
Fix for issue #426.
  • Loading branch information
bgaillard authored and linkesch committed Jun 2, 2017
1 parent 95e4864 commit e626c6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/images.js
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@
if (selection && selection.rangeCount) {
range = selection.getRangeAt(0);
current = range.commonAncestorContainer;
$current = current.nodeName === '#text' ? $(current).parent() : $(current);
$current = current.nodeName === '#text' || current.nodeName === 'BR' ? $(current).parent() : $(current);
caretPosition = MediumEditor.selection.getCaretOffsets(current).left;

// Is backspace pressed and caret is at the beginning of a paragraph, get previous element
Expand Down

0 comments on commit e626c6e

Please sign in to comment.