1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-28 06:20:15 +02:00

Improvement: harmonize usage of constants (#30285)

This commit is contained in:
Sparks
2020-03-09 16:26:29 +01:00
committed by GitHub
parent 7d8c7c4ba8
commit c47547cd09
4 changed files with 11 additions and 8 deletions

View File

@@ -25,6 +25,7 @@ const DATA_API_KEY = '.data-api'
const ClassName = {
ACTIVE: 'active',
BUTTON: 'btn',
DISABLED: 'disabled',
FOCUS: 'focus'
}
@@ -89,8 +90,8 @@ class Button {
if (triggerChangeEvent) {
if (input.hasAttribute('disabled') ||
rootElement.hasAttribute('disabled') ||
input.classList.contains('disabled') ||
rootElement.classList.contains('disabled')) {
input.classList.contains(ClassName.DISABLED) ||
rootElement.classList.contains(ClassName.DISABLED)) {
return
}