Skip to main content

Search and Top Navigation

#8835 closed bug (notabug)

Opened November 20, 2012 02:05AM UTC

Closed November 20, 2012 02:07AM UTC

Last modified November 20, 2012 05:32AM UTC

_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);
Attachments (0)
Change History (2)

Changed November 20, 2012 02:07AM UTC by mikesherov comment:1

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!

Changed November 20, 2012 05:32AM UTC by bdh92123 comment:2

_comment0: I changed html code structure. Thanks to answer.1353389749371882

I changed my html code structure. Thanks to answer.