]> git.mjollnir.org Git - moodle.git/commitdiff
Removed CloseOnEsc completely because it has issues on IE6
authormoodler <moodler>
Thu, 12 Feb 2004 12:17:02 +0000 (12:17 +0000)
committermoodler <moodler>
Thu, 12 Feb 2004 12:17:02 +0000 (12:17 +0000)
and wasn't that useful anyway

http://moodle.org/mod/forum/discuss.php?d=5253#24136

lib/editor/popups/fullscreen.php

index ec007fc8470dc239d15823bfcc8a6c476f4984ce..46dadd8803bf06246b9b5ac2cbcfa3e74f2df4c4 100644 (file)
@@ -37,23 +37,6 @@ for (var i = 0; i < scripts.length; ++i) {
 var parent_object  = null;
 var editor         = null;      // to be initialized later [ function init() ]
 
-/* ---------------------------------------------------------------------- *\
-  Function    : 
-  Description : 
-\* ---------------------------------------------------------------------- */
-
-function _CloseOnEsc(ev) {
-  if (document.all) {
-    // IE
-    ev = window.event;
-  }
-  if (ev.keyCode == 27) {
-    // update_parent();
-    window.close();
-    return;
-  }
-}
-
 /* ---------------------------------------------------------------------- *\
   Function    : cloneObject
   Description : copy an object by value instead of by reference
@@ -135,9 +118,6 @@ function init() {
     setInterval(update_parent, 500);
 
     // setup event handlers
-    document.body.onkeypress = _CloseOnEsc;
-    editor._doc.body.onkeypress = _CloseOnEsc;
-    editor._textArea.onkeypress = _CloseOnEsc;
     window.onresize = resize_editor;
   }, 333);                      // give it some time to meet the new frame
 }