Fixed bug #12923: Javascript error in tmenu_layers.php & gmenu_layers.php (Thanks...
authorBenni Mack <benni.mack@typo3.org>
Sat, 22 May 2010 14:29:06 +0000 (14:29 +0000)
committerBenni Mack <benni.mack@typo3.org>
Sat, 22 May 2010 14:29:06 +0000 (14:29 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-2@7660 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/media/scripts/gmenu_layers.php
typo3/sysext/cms/tslib/media/scripts/tmenu_layers.php

index 45c86bf..7330fab 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-05-22  Benjamin Mack  <benni@typo3.org>
+
+       * Fixed bug #12923: Javascript error in tmenu_layers.php & gmenu_layers.php (Thanks to Klaus Goessl)
+
 2010-05-22  Xavier Perseguers  <typo3@perseguers.ch>
  
        * Fixed bug #14175: belog not shown / error when actions: error is selected (thanks to Philipp Thiele)
index bdf2496..5d1b836 100644 (file)
@@ -424,8 +424,10 @@ GLV_timeout_count++;
 ';
                $GLOBALS['TSFE']->JSeventFuncCalls['onload']['GL_initLayers()']= 'GL_initLayers();';
                $GLOBALS['TSFE']->JSeventFuncCalls['onload'][$this->WMid]=      'GL_restoreMenu("'.$this->WMid.'");';
-               $GLOBALS['TSFE']->JSeventFuncCalls['onmousemove']['GL_getMouse(e)']= 'GL_getMouse(e);'; // Should be called BEFORE any of the 'local' getMouse functions!
-               $GLOBALS['TSFE']->JSeventFuncCalls['onmousemove'][$this->WMid]= 'GL'.$this->WMid.'_getMouse(e);';
+               // Should be called BEFORE any of the 'local' getMouse functions!
+               // is put inside in a try catch block to avoid JS errors in IE
+               $GLOBALS['TSFE']->JSeventFuncCalls['onmousemove']['GL_getMouse(e)']= 'try{GL_getMouse(e);}catch(ex){};';
+               $GLOBALS['TSFE']->JSeventFuncCalls['onmousemove'][$this->WMid]= 'try{GL'.$this->WMid.'_getMouse(e);}catch(ex){};';
                $GLOBALS['TSFE']->JSeventFuncCalls['onmouseup'][$this->WMid]= 'GL_mouseUp(\''.$this->WMid.'\',e);';
 
                $GLOBALS['TSFE']->divSection.=implode($this->divLayers,chr(10)).chr(10);
index d8fc997..b8a8edb 100644 (file)
@@ -424,8 +424,10 @@ GLV_timeout_count++;
 ';
                $GLOBALS['TSFE']->JSeventFuncCalls['onload']['GL_initLayers()']= 'GL_initLayers();';
                $GLOBALS['TSFE']->JSeventFuncCalls['onload'][$this->WMid]=      'GL_restoreMenu("'.$this->WMid.'");';
-               $GLOBALS['TSFE']->JSeventFuncCalls['onmousemove']['GL_getMouse(e)']= 'GL_getMouse(e);'; // Should be called BEFORE any of the 'local' getMouse functions!
-               $GLOBALS['TSFE']->JSeventFuncCalls['onmousemove'][$this->WMid]= 'GL'.$this->WMid.'_getMouse(e);';
+               // Should be called BEFORE any of the 'local' getMouse functions!
+               // is put inside in a try catch block to avoid JS errors in IE
+               $GLOBALS['TSFE']->JSeventFuncCalls['onmousemove']['GL_getMouse(e)']= 'try{GL_getMouse(e);}catch(ex){};';
+               $GLOBALS['TSFE']->JSeventFuncCalls['onmousemove'][$this->WMid]= 'try{GL'.$this->WMid.'_getMouse(e);}catch(ex){};';
                $GLOBALS['TSFE']->JSeventFuncCalls['onmouseup'][$this->WMid]= 'GL_mouseUp(\''.$this->WMid.'\',e);';
 
                $GLOBALS['TSFE']->divSection.=implode($this->divLayers,chr(10)).chr(10);