[FIX] website editor: Unable to create link after selecting text

This commit is contained in:
Christophe Matthieu
2015-01-16 16:38:08 +01:00
parent cd51e3d317
commit 7c9e2cbc5e
@@ -1417,7 +1417,12 @@ define(['summernote/summernote'], function () {
sc = dom.firstChild(so ? sc.childNodes[so] : sc);
so = 0;
} else if (so !== sc.textContent.length) {
sc = sc.splitText(so);
if (sc === ec) {
ec = sc = sc.splitText(so);
eo -= so;
} else {
sc = sc.splitText(so);
}
so = 0;
}
if (ec.tagName) {