Side navigation
#7897 closed bug (invalid)
Opened January 04, 2011 09:30PM UTC
Closed January 22, 2011 08:08AM UTC
Descendant id selector bug in IE when running in IE7 mode
Reported by: | riaanl@gmail.com | Owned by: | riaanl@gmail.com |
---|---|---|---|
Priority: | undecided | Milestone: | |
Component: | unfiled | Version: | 1.4.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Descendant id selector does not work in IE when running in IE7 mode (http://msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx).
In the example @ http://jsfiddle.net/riaanl/TGwGW/, the selector ('#uiContainerX #txtName') to find the first input #txtName in #uiContainerX works; But when trying to access the other input #txtName with selector '#uiContainerX #txtName' does not work and returns an unexpected object.
Expected Result:
$('#uiContainerX #txtName').attr('id') >> txtName
$('#uiContainerY #txtName').attr('id') >> txtName
$('#uiContainerY [id=txtName]').attr('id') >> txtName
$('#txtName', '#uiContainerY').attr('id') >> txtName
The result in ie with IE7 mode ON:
$('#uiContainerX #txtName').attr('id') >> txtName
$('#uiContainerY #txtName').attr('id') >> undefined
$('#uiContainerY [id=txtName]').attr('id') >> txtName
$('#txtName', '#uiContainerY').attr('id') >> txtName
Attachments (0)
Change History (3)
Changed January 04, 2011 09:35PM UTC by comment:1
Changed January 08, 2011 03:51AM UTC by comment:2
milestone: | 1.6 |
---|---|
owner: | → riaanl@gmail.com |
status: | new → pending |
Thanks for taking the time to contribute to the jQuery project by writing a bug report. Your test case contains invalid html as there are two elements with the same id "txtName" which isn't allowed (http://www.w3.org/TR/html5/elements.html#the-id-attribute)
Please report back if you can provide a test case with valid html which still reproduces the error described.
Changed January 22, 2011 08:08AM UTC by comment:3
resolution: | → invalid |
---|---|
status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
to replicate the issue, one must add
to the head section of the page.