diff --git a/js/h5p-confirmation-dialog.js b/js/h5p-confirmation-dialog.js index 15dd71e..01fa1d7 100644 --- a/js/h5p-confirmation-dialog.js +++ b/js/h5p-confirmation-dialog.js @@ -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; };