Closed partikule closed 12 years ago
another solution is to use try/catch in the setStyle function (see this commit : https://github.com/cbattarel/mochaui/commit/6f71f3789b6131a9661f04b586f0e4ee3a6e70ce )
Example of the Mootools bug here : http://partikule.partikule.net/mootools_setstyle_bug/index.html
Mootools ticket : https://mootools.lighthouseapp.com/projects/2706-mootools/tickets/1258-setstyle-negative-value-and-ie7
Final answer from mootools : https://mootools.lighthouseapp.com/projects/2706-mootools/tickets/1258-setstyle-negative-value-and-ie7#ticket-1258-7
I agree with dimitar : MochaUI should check these kind of negative values and do so it is compatible with IE7. Thanks to god we do not speak about IE6 anymore, but IE7 and IE8 are widely used by people in important companies, so they are important browser (in the case you want to use mochaUI in the real worls and not only for geeks or to play during hollidays...)
It was also happening in IE9. This should no longer happen, at least it doesn't in IE9 on my machine. Let me know if I need to look at this for IE7-8. -Chris
The Mootools 1.3 setStyle function generates an "Invalid argument" when trying to set a negative height value in IE7 and IE8 (not tested in IE9).
During Destop init, panel height are calculated by destop.js->panelHeight2() and sometimes, a negative value can be tried to be set to a panel (in my case, I have 2 columns with 1 panel in each column).
Found a solution :
In desktop.js, function panelHeight2(), replace :
by: