From 2fea1d7c7ff6ac1c8f71a7e26e34315964891374 Mon Sep 17 00:00:00 2001 From: hiendinh Date: Mon, 6 Jul 2020 15:24:41 +0700 Subject: [PATCH] Fix/466 Store correct endContainer and endOffset when mergerFoward --- lib/rangy-core.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rangy-core.js b/lib/rangy-core.js index dafb1ce1..8eda3de2 100644 --- a/lib/rangy-core.js +++ b/lib/rangy-core.js @@ -2034,10 +2034,10 @@ var mergeForward = function(node) { var sibling = node.nextSibling; - if (sibling && sibling.nodeType == node.nodeType) { + if (sibling) { + node.appendData(sibling.textContent); ec = node; eo = node.length; - node.appendData(sibling.data); removeNode(sibling); } }; @@ -3842,4 +3842,4 @@ } return api; -}, this); \ No newline at end of file +}, this);