[BUGFIX] Fix JavaScript error for GMENU rollover 75/47975/2
authorFrank Naegler <frank.naegler@typo3.org>
Fri, 29 Apr 2016 14:50:47 +0000 (16:50 +0200)
committerMorton Jonuschat <m.jonuschat@mojocode.de>
Sat, 30 Apr 2016 08:19:33 +0000 (10:19 +0200)
Resolves: #75983
Releases: master, 7.6
Change-Id: I9851418d2add84daf326257fa27f91574e532923
Reviewed-on: https://review.typo3.org/47972
Reviewed-by: Sascha Egerer <sascha@sascha-egerer.de>
Tested-by: Sascha Egerer <sascha@sascha-egerer.de>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
(cherry picked from commit 65141417e3c37dd178e77312bbd9074eb074f05e)
Reviewed-on: https://review.typo3.org/47975

typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php

index 6c109db..f9b7df5 100644 (file)
@@ -4308,13 +4308,13 @@ class TypoScriptFrontendController
                 case 'mouseOver':
                     $this->additionalJavaScript[$key] = '              // JS function for mouse-over
                function over(name, imgObj) {   //
-                       if (version == "n3" && document[name]) {document[name].src = eval(name+"_h.src");}
+                       if (document[name]) {document[name].src = eval(name+"_h.src");}
                        else if (document.getElementById && document.getElementById(name)) {document.getElementById(name).src = eval(name+"_h.src");}
                        else if (imgObj)        {imgObj.src = eval(name+"_h.src");}
                }
                        // JS function for mouse-out
                function out(name, imgObj) {    //
-                       if (version == "n3" && document[name]) {document[name].src = eval(name+"_n.src");}
+                       if (document[name]) {document[name].src = eval(name+"_n.src");}
                        else if (document.getElementById && document.getElementById(name)) {document.getElementById(name).src = eval(name+"_n.src");}
                        else if (imgObj)        {imgObj.src = eval(name+"_n.src");}
                }';