diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umblightbox.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umblightbox.directive.js index 0874c54cd2..268d62723e 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umblightbox.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umblightbox.directive.js @@ -77,7 +77,7 @@ (function() { 'use strict'; - function LightboxDirective() { + function LightboxDirective(focusLockService) { function link(scope, el, attr, ctrl) { @@ -88,6 +88,9 @@ el.appendTo("body"); + + focusLockService.addInertAttribute(); + // clean up scope.$on('$destroy', function() { // unbind watchers @@ -95,6 +98,9 @@ eventBindings[e](); } + focusLockService.removeInertAttribute(); + + document.getElementsByClassName("umb-lightbox__close")[0].blur(); el.remove(); }); } diff --git a/src/Umbraco.Web.UI.Client/src/views/components/umb-lightbox.html b/src/Umbraco.Web.UI.Client/src/views/components/umb-lightbox.html index 751375bbde..71e18769ab 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/umb-lightbox.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/umb-lightbox.html @@ -2,7 +2,7 @@
-