From: Joshua Wilson <10873576+jwilson8767@users.noreply.github.com> Date: Mon, 11 Feb 2019 13:15:03 +0000 (-0500) Subject: minor jQuery.hasclass removal (#28158) X-Git-Tag: v5.0.0-alpha1~1274 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fdbb5db9192321564fd480d4ee77a2e966312427;p=thirdparty%2Fbootstrap.git minor jQuery.hasclass removal (#28158) --- diff --git a/js/src/modal.js b/js/src/modal.js index e2d61621d3..69b77009d1 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -245,7 +245,7 @@ class Modal { this._element.removeAttribute('aria-hidden') this._element.setAttribute('aria-modal', true) - if ($(this._dialog).hasClass(ClassName.SCROLLABLE)) { + if (this._dialog.classList.contains(ClassName.SCROLLABLE)) { this._dialog.querySelector(Selector.MODAL_BODY).scrollTop = 0 } else { this._element.scrollTop = 0 diff --git a/js/tests/unit/modal.js b/js/tests/unit/modal.js index dacb1fb8d7..a9a3df838b 100644 --- a/js/tests/unit/modal.js +++ b/js/tests/unit/modal.js @@ -41,7 +41,7 @@ $(function () { QUnit.test('should throw explicit error on undefined method', function (assert) { assert.expect(1) - var $el = $('