Bug Tracker

Ticket #2883 (closed bug: fixed)

Opened 6 months ago

Last modified 6 months ago

UI Tabs - Css Class ui-tabs-panel not added to exsisting element

Reported by: sparkooo Assigned to: paul
Type: bug Priority: major
Milestone: 1.2.4 Component: ui
Version: 1.2.3 Keywords:
Cc: Needs: Review

Description

When adding tabs (through .tabs('add')) to an exsisting div element the class ui-tabs-panel is not applied, although this calss will be applied when creating tabs from the init. The below code fixed this for me

            // try to find an existing element before creating a new one
            var $panel = $('#' + id);
            if (!$panel.length) {
                $panel = $(o.panelTemplate).attr('id', id)
                    .addClass(o.panelClass).addClass(o.hideClass);
                $panel.data('destroy.tabs', true);
            }else{ // Ensure styling is applied to exsisting tab element
	       $panel.hasClass(o.panelClass) || $panel.addClass(o.panelClass)
			}

Attachments

Change History

Changed 6 months ago by sparkooo

Sorry added to core component instead of UI, unsure how to change this on ticket.

Changed 6 months ago by scott.gonzalez

  • owner set to paul
  • component changed from core to ui

Changed 6 months ago by scott.gonzalez

  • status changed from new to closed
  • resolution set to fixed

Fixed in [5641]. Thanks.

Note: See TracTickets for help on using tickets.