[FIX] website editor: delete content should not remove the editable ancestor node when all content is seleted
This commit is contained in:
@@ -524,7 +524,12 @@ define(['summernote/editing/Editor', 'summernote/summernote'], function (Editor)
|
||||
};
|
||||
}
|
||||
|
||||
if (ancestor.tagName) {
|
||||
if (dom.isEditable(ancestor)) {
|
||||
sc = $("<br/>")[0];
|
||||
so = 0;
|
||||
$(ancestor).html(sc);
|
||||
|
||||
} else if (ancestor.tagName) {
|
||||
var ancestor_sc = sc;
|
||||
var ancestor_ec = ec;
|
||||
while (ancestor !== ancestor_sc && ancestor !== ancestor_sc.parentNode) { ancestor_sc = ancestor_sc.parentNode; }
|
||||
|
||||
Reference in New Issue
Block a user