Element 'next' method misbehaving in IE7
Reported by Richard | May 30th, 2008 @ 11:12 AM
In IE7 the 'next' element method behaves differently in IE7 than it does in Firefox. The Firefox behaviour is as I would expect it to be so I believe the problem is in IE7.
When the next method is applied to
- list that inlcudes sub-lists, IE7 will return the next
- element instead of the
- element which forms a sub list after the
- element. While this seems logical from a lists point of view, it is not logical from the DOM point of view as the
- element should be seen as a sibling of the list element preceeding it.
I have attached a test.html file which demonstrates this problem. The alert box reports the 'next' element's tagName and contents and the message is different in IE7 than in Firefox 2.
- element. While this seems logical from a lists point of view, it is not logical from the DOM point of view as the
Comments and changes to this ticket
-

Richard May 30th, 2008 @ 11:14 AM
Sorry I didn't realise my referencese to the HTML list tags would mess up the layout, this should be clearer:
In IE7 the 'next' element method behaves differently in IE7 than it does in Firefox. The Firefox behaviour is as I would expect it to be so I believe the problem is in IE7.
When the next method is applied to 'li' elements in a
- list that inlcudes sub-lists, IE7 will return the next 'li' element instead of the 'ul' element which forms a sub list after the 'li' element. While this seems logical from a lists point of view, it is not logical from the DOM point of view as the 'ul' element should be seen as a sibling of the list element preceeding it.
I have attached a test.html file which demonstrates this problem. The alert box reports the 'next' element's tagName and contents and the message is different in IE7 than in Firefox 2.
-
-
-
John-David Dalton June 5th, 2008 @ 02:55 PM
- → State changed from new to invalid
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
The Prototype JavaScript library.
