X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/3193141f55df20910cf8ba35f9e669d79c90d3f4..c988cd5d12cb6203ca8216e05bcbc202e14a04f8:/platforma/static/js/lib/codemirror/undo.js diff --git a/platforma/static/js/lib/codemirror/undo.js b/platforma/static/js/lib/codemirror/undo.js index 97daf593..5f717a9e 100644 --- a/platforma/static/js/lib/codemirror/undo.js +++ b/platforma/static/js/lib/codemirror/undo.js @@ -250,7 +250,7 @@ History.prototype = { function buildLine(node) { var text = []; for (var cur = node ? node.nextSibling : self.container.firstChild; - cur && !isBR(cur); cur = cur.nextSibling) + cur && cur.nodeName != "BR"; cur = cur.nextSibling) if (cur.currentText) text.push(cur.currentText); return {from: node, to: cur, text: cleanText(text.join(""))}; } @@ -275,7 +275,7 @@ History.prototype = { // Get the BR element after/before the given node. function nextBR(node, dir) { var link = dir + "Sibling", search = node[link]; - while (search && !isBR(search)) + while (search && search.nodeName != "BR") search = search[link]; return search; }