Confirmation dialog - Focus confirm button on show.

HFJ-1860
pull/23/head
Thomas Marstrander 2016-05-03 11:15:21 +02:00
parent 4da518296e
commit 6e7e144900
1 changed files with 3 additions and 4 deletions

View File

@ -185,6 +185,9 @@ H5P.ConfirmationDialog = (function (EventDispatcher) {
popup.classList.remove('hidden');
popupBackground.classList.remove('hiding');
// Focus confirm button
confirmButton.focus();
// Resize iFrame if necessary
if (resizeIFrame && options.instance) {
setTimeout(function () {
@ -198,10 +201,6 @@ H5P.ConfirmationDialog = (function (EventDispatcher) {
}, 0);
// Programmatically focus popup
popup.setAttribute('tabindex', '-1');
popup.focus();
return this;
};