[BUGFIX] Clearing cache from toolbar fails in IE8 98/18798/2
authorAndreas Kie├čling <andreas.kiessling@web.de>
Sat, 23 Feb 2013 12:49:47 +0000 (13:49 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 7 Mar 2013 22:20:28 +0000 (23:20 +0100)
Fix for regression in #45595 that was introduced with #36364
IE8 does not pass the click event to the handler function and thus
raises a JavaScript error. The event can be fetched from the window
object in this case.

Fixes: #45595
Releases: 6.1, 6.0, 4.7, 4.6, 4.5

Change-Id: I9ccd5c8ae660a34e404122d9dd1c816909688b3e
Reviewed-on: https://review.typo3.org/18798
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/js/clearcachemenu.js

index e07dbef..f4c5567 100644 (file)
@@ -50,6 +50,7 @@ var ClearCacheMenu = Class.create({
                                // observe all clicks on clear cache actions in the menu
                        $$('#clear-cache-actions-menu li a').each(function(element) {
                                $(element).onclick = function(event) {
+                                       event = event || window.event;
                                        self.clearCache.call(self, event);
                                        return false;
                                };