[kupu-checkins] r37580 - kupu/trunk/kupu/common
yuppie at codespeak.net
yuppie at codespeak.net
Tue Jan 30 11:39:39 CET 2007
Author: yuppie
Date: Tue Jan 30 11:39:37 2007
New Revision: 37580
Modified:
kupu/trunk/kupu/common/kupuhelpers.js
Log:
- always reset after select()
Modified: kupu/trunk/kupu/common/kupuhelpers.js
==============================================================================
--- kupu/trunk/kupu/common/kupuhelpers.js (original)
+++ kupu/trunk/kupu/common/kupuhelpers.js Tue Jan 30 11:39:37 2007
@@ -1002,6 +1002,7 @@
var range = doc.body.createTextRange();
range.collapse();
range.select();
+ this.reset();
}
this.selectNodeContents = function(node) {
@@ -1017,14 +1018,14 @@
range.moveEnd('character', -1);
range.moveEnd('character', 1);
range.select();
- this.selection = this.document.getDocument().selection;
+ this.reset();
};
this.collapse = function(collapseToEnd) {
var range = this.selection.createRange();
range.collapse(!collapseToEnd);
range.select();
- this.selection = document.getDocument().selection;
+ this.reset();
};
this.replaceWithNode = function(newnode, selectAfterPlace) {
@@ -1166,6 +1167,7 @@
var range = this.selection.createRange();
range.moveStart('character', offset);
range.select();
+ this.reset();
};
this.moveEnd = function(offset) {
@@ -1173,6 +1175,7 @@
var range = this.selection.createRange();
range.moveEnd('character', offset);
range.select();
+ this.reset();
};
this.reset = function() {
@@ -1217,6 +1220,7 @@
this.restoreRange = function(range) {
try {
range.select();
+ this.reset();
} catch(e) {
};
};
More information about the kupu-checkins
mailing list