Tabs: bug when adding new tab with existing content element

22 views
Skip to first unread message

Bryan

unread,
Jan 7, 2010, 7:12:29 PM1/7/10
to jQuery UI Development
I'd like to patch the tabs bug #4578, which involves adding a new tab
whose content element is already present in the DOM. Before I submit a
patch I'd like to get some feedback about what others think the best
behavior in this case should be. I have described the issue in detail
& provided a test case in the case comments:

http://dev.jqueryui.com/ticket/4578

Thanks,
Bryan

Scott González

unread,
Jan 12, 2010, 8:29:31 PM1/12/10
to jquery...@googlegroups.com
How about this:

if the panel already exists
- don't move it at all
else
- if other tabs exist
-- use existing insertBefore behavior
- else
-- appendTo(this.element)

That would place new panels when there are no existing tabs at the end of the container element. If the user wants the tabs in some other location, they can either create the div manually before inserting the tab or move the panel after it has been created. Does that work for you?


--
You received this message because you are subscribed to the Google Groups "jQuery UI Development" group.
To post to this group, send email to jquery...@googlegroups.com.
To unsubscribe from this group, send email to jquery-ui-de...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jquery-ui-dev?hl=en.




Bryan

unread,
Jan 13, 2010, 6:25:14 PM1/13/10
to jQuery UI Development
Works great for me. Thanks for the input.

Bryan

> > jquery-ui-de...@googlegroups.com<jquery-ui-dev%2Bunsubscribe@goog legroups.com>

Reply all
Reply to author
Forward
0 new messages