Skip to content

Commit

Permalink
Make sure focusnode is block before deleting whole block
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Mar 1, 2017
1 parent ba408b7 commit 88c8e70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tinymce-single/tinymce/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@
if ( keyCode === VK.BACKSPACE ) {
var selection = window.getSelection();

if ( ! selection.isCollapsed ) {
if ( ! selection.isCollapsed && editor.dom.isBlock( selection.focusNode ) ) {
if ( selection.anchorOffset === 0 && selection.focusOffset === 0 ) {
if ( element.nextSibling && element.nextSibling.contains( selection.focusNode ) ) {
removeBlock();
Expand Down

0 comments on commit 88c8e70

Please sign in to comment.