Posted by budda on February 6, 2006 at 1:10am
| Project: | S/P Ajax |
| Version: | master |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | needs work |
Issue Summary
Getting Javascript error dialogs in IE6, could be caused by the combination of this and the related menus module. For example clicking on the 'create content' menu item causes a this.parentNode is null error.
Comments
#1
Yes, I need to take a look at the way things are (not) working in IE. Please post more errors here if you find them. Hopefully I will have a chance to take a look this week.
-Jeff
#2
here is a patch i came up with that seems to function in ie 6 and doesnt break the existing ff compatibility.
<?phpElement.addClassName(lis[lis.length - 1], 'last');
- firsta.flip = function() {
+ firsta.onclick = function() {
+ if (this.parentNode){
myul = this.parentNode.getElementsByTagName('ul')[0];
vis = Element.visible(myul);
Element.removeClassName(this, vis ? 'expanded' : 'collapsed');
Element.addClassName(this, vis ? 'collapsed' : 'expanded');
Element.removeClassName(this.myli, vis ? 'expanded' : 'collapsed');
Element.addClassName(this.myli, vis ? 'collapsed' : 'expanded');
new Effect.toggle(this.parentNode.getElementsByTagName('ul')[0], 'blind');
+ }
+ return false;
}
- Event.observe(firsta, 'click', firsta.flip);}
+ Event.observe(firsta, 'click', firsta.onclick);}
}
?>
you can actually safely remove the line:
Event.observe(firsta, 'click', firsta.onclick);
and ie 6.0 and the latest ff still function correctly.
not sure if it is in there for further compatibility beyond those two..
#3
forgot to mention target file is spajax.js lines 41-53
#4
after reviewing the patch submission docs im submitting a cvs diff.
#5
status to patched. see previous attachment.
#6
still need to get the detached menu to work.. changing status