Ticket #6710 (closed bug: fixed)

Opened 4 years ago

Last modified 4 years ago

tabs module uses global selectors instead of local to "this.element" element

Reported by: saksmlz Owned by:
Priority: minor Milestone: 1.8.7
Component: ui.tabs Version: 1.8.6
Keywords: Cc:
Blocking: Blocked by:

Description

There is a difference in how does it work in cases:

Consider we have second html converted into document fragment.

var container = $('<div><div id="tabs"><ul><li><a href="#tabs-1">Nunc tincidunt</a></li><li><a href="#tabs-2">Proin dolor</a></li> </ul> <div id="tabs-1"> <p>first</p> </div> <div id="tabs-2"> <p>second</p> </div></div>');

  1. container.find('#tabs').appendTo('body').tabs();
  1. container.find('#tabs').tabs().appendTo('body');

Variant 1 works as expected but 2 don't.

Change History

comment:2 Changed 4 years ago by saks

  • Status changed from new to closed
  • Resolution set to fixed

Tabs: Added context to global selectors. Fixed #6710 - tabs module uses global selectors instead of local to "this.element" element.

Changeset: 63ec1152d810a80596b195301ee3d2cd3d6a1776

comment:3 Changed 4 years ago by scott.gonzalez

  • Milestone changed from 1.9 to 1.8.7

comment:4 Changed 4 years ago by scott.gonzalez

#5857 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.