From 65141417e3c37dd178e77312bbd9074eb074f05e Mon Sep 17 00:00:00 2001
From: Frank Naegler <frank.naegler@typo3.org>
Date: Fri, 29 Apr 2016 16:50:47 +0200
Subject: [PATCH] [BUGFIX] Fix JavaScript error for GMENU rollover

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>
---
 .../Classes/Controller/TypoScriptFrontendController.php       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
index 34dfe6714652..510101408da1 100644
--- a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
+++ b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
@@ -4021,13 +4021,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");}
 		}';
-- 
GitLab