[FIX] website: snippet editor: if a snippet is dropped near a text node with a previous click, need to get the parent node to trigger the history

This commit is contained in:
Christophe Matthieu
2015-04-09 15:14:20 +02:00
parent 2ec254549c
commit 3d8ac2e3df
@@ -1230,7 +1230,7 @@ define(['summernote/summernote'], function () {
rng = $editable.data('range') || rng;
}
if (!rng && $target.length) {
rng = range.create($target[0],0);
rng = range.create($target.closest("*")[0],0);
}
if (rng) {
try {