javascript execCommand('delete') not delete all selection div in chrome
问题 I try to write an editor with contenteditable & execCommand Everything works fine on Firefox, but in chrome has an error with 'delete' command. Please view bellow photo: This is my code: var $obj = $('#myBlockDivId'); var selection = rangy.getSelection(); if (selection.rangeCount > 0) selection.removeAllRanges(); var range = rangy.createRange(); range.selectNode($obj[0]); selection.addRange(range); range.select(); when i console log: rangy.getSelection().toHtml() ==> it's right but when i