[FIX] website: summernote: don't need to add a white space when delete a selection if the string is not fully erase

This commit is contained in:
Christophe Matthieu
2015-04-09 16:09:07 +02:00
parent c35f8a7b48
commit 368ea9d614
+1 -1
View File
@@ -581,7 +581,7 @@ define(['summernote/editing/Editor', 'summernote/summernote'], function (Editor)
}
eo = so;
if(!dom.isBR(sc) && !sc.textContent.match(/\S|\u00A0/)) {
if(!dom.isBR(sc) && !sc.textContent.match(/\S|\u00A0/) && !dom.isText(dom.hasContentBefore(sc)) && !dom.isText(dom.hasContentAfter(sc))) {
ancestor = dom.node(sc);
var text = document.createTextNode('\u00A0');
$(sc).before(text);