Reverted CM to version 0.63 with 2 patches:
[redakcja.git] / project / static / js / lib / codemirror / util.js
index 61f927d..796025e 100644 (file)
@@ -114,3 +114,12 @@ function addEventHandler(node, type, handler, removeFunc) {
 function nodeText(node) {
   return node.textContent || node.innerText || node.nodeValue || "";
 }
+
+function nodeTop(node) {
+  var top = 0;
+  while (node.offsetParent) {
+    top += node.offsetTop;
+    node = node.offsetParent;
+  }
+  return top;
+}