[kupu-checkins] r52504 - in kupu/trunk/kupu: common doc
duncan at codespeak.net
duncan at codespeak.net
Fri Mar 14 16:13:59 CET 2008
Author: duncan
Date: Fri Mar 14 16:13:58 2008
New Revision: 52504
Modified:
kupu/trunk/kupu/common/kupuhelpers.js
kupu/trunk/kupu/doc/CHANGES.txt
Log:
Fix for Plone ticket 7939: Kupu breaks on Firefox 3.0b4 in OSX
Modified: kupu/trunk/kupu/common/kupuhelpers.js
==============================================================================
--- kupu/trunk/kupu/common/kupuhelpers.js (original)
+++ kupu/trunk/kupu/common/kupuhelpers.js Fri Mar 14 16:13:58 2008
@@ -458,8 +458,9 @@
};
function MozillaSelection(document) {
+ var win = document.getWindow();
this.document = document;
- this.selection = document.getWindow().getSelection();
+ this.selection = win.getSelection();
this._createRange = function() {
return this.document.getDocument().createRange();
@@ -573,7 +574,7 @@
// JavaScript isn't as nice as Python in that respect (kwargs)
// if selectAfterPlace is a DOM node, select all of that node's
// contents, else select the newly added node's
- this.selection = this.document.getWindow().getSelection();
+ this.selection = win.getSelection();
this.selection.addRange(range);
if (selectAfterPlace.nodeType == 1) {
this.selection.selectAllChildren(selectAfterPlace);
@@ -587,7 +588,7 @@
this.selection.addRange(range);
};
};
- this.document.getWindow().focus();
+ win.focus();
};
return node;
};
@@ -965,7 +966,7 @@
};
this.reset = function() {
- this.selection = this.document.getWindow().getSelection();
+ this.selection = win.getSelection();
};
this.cloneContents = function() {
@@ -1007,8 +1008,8 @@
};
//sample kindly snipped from Mozilla's wiki
- if( !Range.prototype.intersectsNode ){
- Range.prototype.intersectsNode = function(node) {
+ if( !win.Range.prototype.intersectsNode ){
+ win.Range.prototype.intersectsNode = function(node) {
var nodeRange = node.ownerDocument.createRange();
try {
nodeRange.selectNode(node);
@@ -1030,8 +1031,8 @@
};
return false;
};
- if( !Range.prototype.containsNode ){
- Range.prototype.containsNode = function(node) {
+ if( !win.Range.prototype.containsNode ){
+ win.Range.prototype.containsNode = function(node) {
var nodeRange = node.ownerDocument.createRange();
try {
nodeRange.selectNode(node);
Modified: kupu/trunk/kupu/doc/CHANGES.txt
==============================================================================
--- kupu/trunk/kupu/doc/CHANGES.txt (original)
+++ kupu/trunk/kupu/doc/CHANGES.txt Fri Mar 14 16:13:58 2008
@@ -10,6 +10,7 @@
- Plone tickets
* 7893 Workaround for bad KSS form submissions
+ * 7939 Kupu breaks on Firefox 3.0b4 in OSX
- 1.4.8
More information about the kupu-checkins
mailing list