I found a logical mistake in the menu building mechanism. Event procedure, which calls switchMenu function, is assigned to all menu items, even to items, which have no submenus. Because of it error "elem has no properties" occures.
To fix this bug, modification to the file dhtml_menu.js with signature
// $Id: dhtml_menu.js,v 1.7 2006/12/27 22:52:48 merlinofchaos Exp $
should be done:
line 20:
- $('ul.menu li > a').each(function() {
+ $('ul.menu li[@class!="leaf"] > a').each(function() {
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | dhtml_menu_js_0.patch | 650 bytes | cburschka |
Comments
Comment #1
cburschkaAttaching a proper patch for this.
I basically understand the bug and the solution, but otherwise Javascript is a closed book to me. However, this patch works for me and gets rid of the error, so unless there are other problems with it, I'll put it in tomorrow.
Comment #2
cburschkaCommitted to DRUPAL-5 and HEAD.
Comment #3
(not verified) commented