Rensselaer Center for Open Source Software

fixing problems with delete not keeping the range in a text area

2 files changed, 11 lines added, 0 lines removed

Changes

--- clientSide/codeEdit/script/hotkey.js 5281be38bad58af729183abff470ce6a30f6dc23
+++ clientSide/codeEdit/script/hotkey.js cbd2abb4f55966a515b994260a5992a07b50a1d5
@@ -151,6 +151,17 @@
+  alert(currentTextNode);
+  
+  //make sure that the selected element is a valid text element
+  var parent = document.getElementById("codeDoc");
+  alert(parent);
+  if (currentTextNode == parent) {
+    currentTextNode = parent.childNodes[currentIndex];
+    currentIndex = currentTextnode.nodeValue.length-1;
+  }
+  
+  alert(currentTextNode);
Briefcase • 56 weeks ago