Permalink
Browse files

Merging from MOODLE_15_STABLE

- adding fix for Bug 4562. Fix posted by sgarcia.
  • Loading branch information...
1 parent e4a7046 commit 1ab4713da23502cb5089d106490bc091e6bfd2b6 julmis committed Jan 25, 2006
Showing with 4 additions and 4 deletions.
  1. +2 −2 lib/editor/htmlarea.php
  2. +2 −2 lib/editor/popups/fullscreen.php
View
@@ -2085,12 +2085,12 @@ function getMozSelection(txtarea) {
var newObj = new Object;
// check for array objects
- if (obj.constructor.toString().indexOf("function Array(") == 1) {
+ if (obj.constructor.toString().indexOf("function Array(") >= 0) {
newObj = obj.constructor();
}
// check for function objects (as usual, IE is fucked up)
- if (obj.constructor.toString().indexOf("function Function(") == 1) {
+ if (obj.constructor.toString().indexOf("function Function(") >= 0) {
newObj = obj; // just copy reference to it
} else for (var n in obj) {
var node = obj[n];
@@ -74,12 +74,12 @@ function cloneObject(obj) {
var newObj = new Object;
// check for array objects
- if (obj.constructor.toString().indexOf("function Array(") == 1) {
+ if (obj.constructor.toString().indexOf("function Array(") >= 0) {
newObj = obj.constructor();
}
// check for function objects (as usual, IE is fucked up)
- if (obj.constructor.toString().indexOf("function Function(") == 1) {
+ if (obj.constructor.toString().indexOf("function Function(") >= 0) {
newObj = obj; // just copy reference to it
} else for (var n in obj) {
var node = obj[n];

0 comments on commit 1ab4713

Please sign in to comment.