From ec02bf59e08109a61025a8e0596c02c660b69fa3 2014-09-08 19:18:34 From: weichm Date: 2014-09-08 19:18:34 Subject: [PATCH] "event" is not defined error in Firefox see http://stackoverflow.com/questions/20522887/referenceerror-event-is-not-defined-error-in-firefox "WebKit follows IE's old behavior of using a global symbol for "event", but Firefox doesn't..." --- diff --git a/IPython/html/static/widgets/js/widget_string.js b/IPython/html/static/widgets/js/widget_string.js index 0ca90be..037d3be 100644 --- a/IPython/html/static/widgets/js/widget_string.js +++ b/IPython/html/static/widgets/js/widget_string.js @@ -202,8 +202,8 @@ define([ // Handles text submition if (e.keyCode == 13) { // Return key this.send({event: 'submit'}); - event.stopPropagation(); - event.preventDefault(); + e.stopPropagation(); + e.preventDefault(); return false; } }, @@ -214,8 +214,8 @@ define([ // TODO: Is the original bug actually a fault of the keyboard // manager? if (e.relatedTarget === null) { - event.stopPropagation(); - event.preventDefault(); + e.stopPropagation(); + e.preventDefault(); return false; } }, @@ -224,8 +224,8 @@ define([ // Prevent a blur from firing if the blur was not user intended. // This is a workaround for the return-key focus loss bug. if (e.relatedTarget === null) { - event.stopPropagation(); - event.preventDefault(); + e.stopPropagation(); + e.preventDefault(); return false; } },