diff --git a/django/contrib/admin/media/js/admin/DateTimeShortcuts.js b/django/contrib/admin/media/js/admin/DateTimeShortcuts.js index ed99c6103d..35199baf84 100644 --- a/django/contrib/admin/media/js/admin/DateTimeShortcuts.js +++ b/django/contrib/admin/media/js/admin/DateTimeShortcuts.js @@ -217,7 +217,7 @@ var DateTimeShortcuts = { DateTimeShortcuts.dismissCalendar(num); }, cancelEventPropagation: function(e) { - if (!e) var e = window.event; + if (!e) e = window.event; e.cancelBubble = true; if (e.stopPropagation) e.stopPropagation(); } diff --git a/django/contrib/admin/media/js/core.js b/django/contrib/admin/media/js/core.js index 8eba69c9bb..d35bd29c1c 100644 --- a/django/contrib/admin/media/js/core.js +++ b/django/contrib/admin/media/js/core.js @@ -19,6 +19,7 @@ function removeEvent(obj, evType, fn) { return true; } else if (obj.detachEvent) { obj.detachEvent("on" + evType, fn); + return true; } else { return false; }