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

Commit e626c6e

Browse files
bgaillardlinkesch
authored andcommitted
Backspace won't trigger delete event (Reopened) (#427)
Fix for issue #426.
1 parent 95e4864 commit e626c6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/images.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@
520520
if (selection && selection.rangeCount) {
521521
range = selection.getRangeAt(0);
522522
current = range.commonAncestorContainer;
523-
$current = current.nodeName === '#text' ? $(current).parent() : $(current);
523+
$current = current.nodeName === '#text' || current.nodeName === 'BR' ? $(current).parent() : $(current);
524524
caretPosition = MediumEditor.selection.getCaretOffsets(current).left;
525525

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

0 commit comments

Comments
 (0)