Opened 12 years ago
Closed 12 years ago
#7897 closed bug (invalid)
Descendant id selector bug in IE when running in IE7 mode
Reported by: | Owned by: | ||
---|---|---|---|
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
Change History (3)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Milestone: | 1.6 |
---|---|
Owner: | set to [email protected]… |
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.
comment:3 Changed 12 years ago by
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.