From cbaf7a7b79c78ec7d877f348d12102acde6adfa0 Mon Sep 17 00:00:00 2001 From: David Bailey Date: Tue, 29 Aug 2017 15:42:58 +0100 Subject: [PATCH] Fix failing test _adjustDialog should be called when the modal is first displayed to prevent it jumping position when the viewport is resized --- js/src/modal.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/src/modal.js b/js/src/modal.js index ab73230c8f..5892ed0451 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -135,6 +135,8 @@ const Modal = (($) => { this._checkScrollbar() this._setScrollbar() + this._adjustDialog() + $(document.body).addClass(ClassName.OPEN) this._setEscapeEvent()