]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Unbreak lines and remove a TODO comment
authorXhmikosR <xhmikosr@gmail.com>
Fri, 18 Sep 2020 07:39:21 +0000 (10:39 +0300)
committerXhmikosR <xhmikosr@gmail.com>
Mon, 21 Sep 2020 11:58:34 +0000 (14:58 +0300)
js/src/button.js
js/src/modal.js
js/src/util.js

index 2aed6b09c71851dc6fa421dc27e46afb0c608ddf..b244c8df479c82f491335b0867a1f7e94e284e5b 100644 (file)
@@ -59,17 +59,14 @@ class Button {
   toggle() {
     let triggerChangeEvent = true
     let addAriaPressed = true
-    const rootElement = $(this._element).closest(
-      SELECTOR_DATA_TOGGLES
-    )[0]
+    const rootElement = $(this._element).closest(SELECTOR_DATA_TOGGLES)[0]
 
     if (rootElement) {
       const input = this._element.querySelector(SELECTOR_INPUT)
 
       if (input) {
         if (input.type === 'radio') {
-          if (input.checked &&
-            this._element.classList.contains(CLASS_NAME_ACTIVE)) {
+          if (input.checked && this._element.classList.contains(CLASS_NAME_ACTIVE)) {
             triggerChangeEvent = false
           } else {
             const activeElement = rootElement.querySelector(SELECTOR_ACTIVE)
@@ -96,8 +93,7 @@ class Button {
 
     if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) {
       if (addAriaPressed) {
-        this._element.setAttribute('aria-pressed',
-          !this._element.classList.contains(CLASS_NAME_ACTIVE))
+        this._element.setAttribute('aria-pressed', !this._element.classList.contains(CLASS_NAME_ACTIVE))
       }
 
       if (triggerChangeEvent) {
index 7b4228ffddf54aad9fa60314221ecbe977440604..a694cb780fa0343a67294b75a8e3c9bfe2db797c 100644 (file)
@@ -453,8 +453,7 @@ class Modal {
   // ----------------------------------------------------------------------
 
   _adjustDialog() {
-    const isModalOverflowing =
-      this._element.scrollHeight > document.documentElement.clientHeight
+    const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight
 
     if (!this._isBodyOverflowing && isModalOverflowing) {
       this._element.style.paddingLeft = `${this._scrollbarWidth}px`
index c27ab33ed6edaf35562cc417871d43c2189a3252..e6b9231bc0a09c38fa539da46265fcec37522a6d 100644 (file)
@@ -125,7 +125,6 @@ const Util = {
     $(element).trigger(TRANSITION_END)
   },
 
-  // TODO: Remove in v5
   supportsTransitionEnd() {
     return Boolean(TRANSITION_END)
   },