Skip to content
Snippets Groups Projects
Commit 279c9375 authored by Diana Huang's avatar Diana Huang
Browse files

Add workaround for Firefox focus issues.

parent ed7b87a8
No related branches found
No related tags found
No related merge requests found
...@@ -46,7 +46,10 @@ function LtiConsumerXBlock(runtime, element) { ...@@ -46,7 +46,10 @@ function LtiConsumerXBlock(runtime, element) {
$(o.closeButton).on('keydown', function (e) { $(o.closeButton).on('keydown', function (e) {
if (e.which === 9) { if (e.which === 9) {
e.preventDefault(); e.preventDefault();
$(modal_id).find('iframe')[0].contentWindow.focus(); // This is a workaround due to Firefox triggering focus calls oddly.
setTimeout(function () {
$modal.find('iframe')[0].contentWindow.focus();
}, 1);
} }
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment