1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-10 07:37:27 +02:00

[Fix #19849] Tabs are opened even if disabled. (#20795)

* [Fix #19849] Tabs are opened even if disabled.

* fix hund code review hints

* rollback hound issues because Travis fails
This commit is contained in:
Alessandro Rodi
2016-12-25 08:31:34 +01:00
committed by Mark Otto
parent 0d96c633b3
commit 9103bffe37
2 changed files with 41 additions and 1 deletions

View File

@@ -36,6 +36,7 @@ const Tab = (($) => {
const ClassName = {
DROPDOWN_MENU : 'dropdown-menu',
ACTIVE : 'active',
DISABLED : 'disabled',
FADE : 'fade',
SHOW : 'show'
}
@@ -79,7 +80,8 @@ const Tab = (($) => {
show() {
if (this._element.parentNode &&
this._element.parentNode.nodeType === Node.ELEMENT_NODE &&
$(this._element).hasClass(ClassName.ACTIVE)) {
$(this._element).hasClass(ClassName.ACTIVE) ||
$(this._element).hasClass(ClassName.DISABLED)) {
return
}