From 926ff4af3a736a9b5949aaa40f7cc001e3d61686 Mon Sep 17 00:00:00 2001 From: Thomas Marstrander Date: Thu, 21 Apr 2016 14:58:21 +0200 Subject: [PATCH] Avoid confirmation dialog skewering content. HFJ-1572 --- js/h5p-confirmation-dialog.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/h5p-confirmation-dialog.js b/js/h5p-confirmation-dialog.js index 3263b76..abeba8a 100644 --- a/js/h5p-confirmation-dialog.js +++ b/js/h5p-confirmation-dialog.js @@ -174,8 +174,10 @@ H5P.ConfirmationDialog = (function (EventDispatcher) { popup.style.top = offsetTop + 'px'; popupBackground.classList.remove('hidden'); fitToContainer(); - popupBackground.classList.remove('hiding'); - popup.classList.remove('hidden'); + setTimeout(function () { + popup.classList.remove('hidden'); + popupBackground.classList.remove('hiding'); + }, 0); // Programmatically focus popup popup.setAttribute('tabindex', '-1');