diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umblockedfield.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umblockedfield.directive.js index 28b0296671..a5f739b924 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umblockedfield.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umblockedfield.directive.js @@ -33,9 +33,25 @@ angular.module("umbraco.directives") } scope.toggleLock = function(){ + scope.locked = !scope.locked; + + if(scope.locked === false) { + autoFocusField(); + } + }; + function autoFocusField() { + + // timeout to make sure dom has updated from a disabled field + $timeout(function() { + var input = element.children('.umb-locked-field__input'); + input.focus(); + }); + + } + } };