When using Activemenus with the Garland theme in IE6, the -/+ icons don't get applied, and more importantly, you can only collapse nodes, or expand nodes that you've previously collapsed, but you can't expand new nodes which is obviously the more useful feature of this module.
It shows the right cursors at all the right times though (hand over -/+, pointer otherwise).
Affected browsers: IE6
Not affected: Fx1.5, Fx2, Opera
Has its own (separately filed) issue: IE7
Affected themes: Garland
(though for other themes note also http://drupal.org/node/140620)
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | jstools_activemenu_fix_garland_ie_140621.patch | 676 bytes | Jomel |
Comments
Comment #1
Jomel commentedOk I've found the problem: In the click handler for collapsed nodes that haven't been loaded, you do this:
In most browsers, .css('padding-left') returns the computed value in pixels, however in IE returns it in its original format, so for the garland theme we get "1.5 em", which is parsed as 1 pixel, and is hence impossible to click.
I suggest just using a hardcoded value if .css('padding-left') isn't in pixels, like so:
Note that 18px is the actual value of .css('padding-left') when using the Garland theme, as well as being a reasonable default.
I've attached a patch which does exactly this. Please review/checkin the fix to the other IE7 issue, while you're at it: http://drupal.org/node/140622
For reference, I tried another approach that first tries to multiply em values by the font-size, but this in turn assumes that the font-size is in pixels, so probably isn't worth it (e.g. what if the font-size is "150%"!)
Accurately converting between css length values is horrific and requires inserting a hidden div to the DOM!
Comment #2
Jomel commentedForgot to mention I tested in Fx1.5, Fx2, IE6, IE7 and Opera9 (on Windows) in each of Garland, Pushbutton and Bluemarine and it works fine (with my patch to http://drupal.org/node/140622 and ignoring the existing bugs http://drupal.org/node/140620 and http://drupal.org/node/140585)
Comment #3
nedjoThanks a lot Jomel for your work tracking down these tricky issues! Let me know if you end up getting Drupal CVS write access and want to help maintain activemenus or other jstools components. Meantime, I'll apply your patches as soon as I have a chance to test.
Comment #4
nedjoApplied, thanks.
Comment #5
(not verified) commented