[kupu-checkins] r51164 - kupu/trunk/kupu/common
duncan at codespeak.net
duncan at codespeak.net
Fri Feb 1 10:23:21 CET 2008
Author: duncan
Date: Fri Feb 1 10:23:20 2008
New Revision: 51164
Modified:
kupu/trunk/kupu/common/kupueditor.js
Log:
Plone ticket 7494: Insert internal link using IE links in the wrong place
Putting focus back into the iframe triggered the 'save selection' code before the original selection had been restored. Modified
resumeEditing to not mark editing as resumed until selection has been restored, and modified _saveSelection to not save it when editing
is suspended.
Modified: kupu/trunk/kupu/common/kupueditor.js
==============================================================================
--- kupu/trunk/kupu/common/kupueditor.js (original)
+++ kupu/trunk/kupu/common/kupueditor.js Fri Feb 1 10:23:20 2008
@@ -638,6 +638,8 @@
};
this._isDocumentSelected = function() {
+ if (this.suspended) return false;
+
var editable_body = this.getInnerDocument().getElementsByTagName('body')[0];
try {
var selrange = this.getInnerDocument().selection.createRange();
@@ -895,7 +897,6 @@
if (!this.suspended) {
return;
}
- this.suspended = false;
this.clearClass('kupu-modal');
for (var id in this.tools) {
this.tools[id].enable();
@@ -911,6 +912,7 @@
this.focusDocument();
this.getSelection().restoreRange(this._previous_range);
}
+ this.suspended = false;
};
this.newElement = function(tagName) {
return newDocumentElement(this.getInnerDocument(), tagName, arguments);
More information about the kupu-checkins
mailing list