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 = $('