Fixes formwidget logic leaking out of context
For example: a formwidget with no tabs can exist inside a set of preview content tabs
This commit is contained in:
parent
9812e1f4ec
commit
cf7585f79b
|
|
@ -137,6 +137,8 @@
|
|||
* called multiple times in a single cycle due to input.trigger.
|
||||
*/
|
||||
FormWidget.prototype.toggleEmptyTabs = function() {
|
||||
var self = this,
|
||||
form = this.$el
|
||||
|
||||
if (this.toggleEmptyTabsTimer !== undefined) {
|
||||
window.clearTimeout(this.toggleEmptyTabsTimer)
|
||||
|
|
@ -147,7 +149,7 @@
|
|||
var tabControl = $('[data-control=tab]', this.$el),
|
||||
tabContainer = $('.nav-tabs', tabControl)
|
||||
|
||||
if (!tabControl.length)
|
||||
if (!tabControl.length || !$.contains(form.get(0), tabControl.get(0)))
|
||||
return
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue