mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-10-05 01:44:18 +00:00
parent
b397294d42
commit
2e8e52dec1
12
ui/tabs.js
12
ui/tabs.js
@ -372,7 +372,10 @@ return $.widget( "ui.tabs", {
|
||||
},
|
||||
|
||||
_processTabs: function() {
|
||||
var that = this;
|
||||
var that = this,
|
||||
prevTabs = this.tabs,
|
||||
prevAnchors = this.anchors,
|
||||
prevPanels = this.panels;
|
||||
|
||||
this.tablist = this._getList()
|
||||
.addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
|
||||
@ -456,6 +459,13 @@ return $.widget( "ui.tabs", {
|
||||
this.panels
|
||||
.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
|
||||
.attr( "role", "tabpanel" );
|
||||
|
||||
// Avoid memory leaks (#10056)
|
||||
if ( prevTabs ) {
|
||||
this._off( prevTabs.not( this.tabs ) );
|
||||
this._off( prevAnchors.not( this.anchors ) );
|
||||
this._off( prevPanels.not( this.panels ) );
|
||||
}
|
||||
},
|
||||
|
||||
// allow overriding how to find the list for rare usage scenarios (#7715)
|
||||
|
Loading…
Reference in New Issue
Block a user