Avoid confirmation dialog skewering content.

HFJ-1572
pull/21/head
Thomas Marstrander 2016-04-21 14:58:21 +02:00
parent 6869ecbb09
commit 926ff4af3a
1 changed files with 4 additions and 2 deletions

View File

@ -174,8 +174,10 @@ H5P.ConfirmationDialog = (function (EventDispatcher) {
popup.style.top = offsetTop + 'px'; popup.style.top = offsetTop + 'px';
popupBackground.classList.remove('hidden'); popupBackground.classList.remove('hidden');
fitToContainer(); fitToContainer();
popupBackground.classList.remove('hiding'); setTimeout(function () {
popup.classList.remove('hidden'); popup.classList.remove('hidden');
popupBackground.classList.remove('hiding');
}, 0);
// Programmatically focus popup // Programmatically focus popup
popup.setAttribute('tabindex', '-1'); popup.setAttribute('tabindex', '-1');