Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#8835 closed bug (notabug)

_getPanelForTab bug when tabs has same id is nested.

Reported by: bdh92123 Owned by:
Priority: minor Milestone: 1.10.0
Component: ui.tabs Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:

Description

when the follow situation:

<div id="tab1">

<ul><li><a href="#panel1">Panel1</a></li></ul> <div id="panel1">

<div id="nestedtab">

<ul><li><a href="#panel1">Nested Panel1</a></li></ul> <div id="panel1">

</div>

</div>

</div>

</div> ,

line 11700 in _getPanelForTab function :

  this.element.find( this._sanitizeSelector( "#" + id ) );

catches two 'panel1' div.

that line should be

  this.element.find( this._sanitizeSelector( "#" + id ) ).eq(0);

Change History (2)

comment:1 Changed 10 years ago by mikesherov

Resolution: notabug
Status: newclosed

Thanks for contributing. jQuery never has, but specifically removed, support for having two elements with the same id on a page. That's invalid markup. If you can reproduce this bug using valid HTML without duplicated id's, please submit a new bug report. Thanks again!

comment:2 Changed 10 years ago by bdh92123

I changed my html code structure. Thanks to answer.

Last edited 10 years ago by bdh92123 (previous) (diff)
Note: See TracTickets for help on using tickets.