diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js index 221b133b1e..a236e7f5ac 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/buttons/umbbutton.directive.js @@ -171,7 +171,7 @@ Use this directive to render an umbraco button. The directive can be used to gen vm.innerState = changes.state.currentValue; } if (changes.state.currentValue === 'success' || changes.state.currentValue === 'error') { - // set the state back to 'init' after a success or error + // set the state back to 'init' after a success or error $timeout(function () { vm.innerState = 'init'; }, 2000); @@ -196,6 +196,13 @@ Use this directive to render an umbraco button. The directive can be used to gen setButtonLabel(); } + // watch for type changes + if(changes.type) { + if (!vm.type) { + vm.type = "button";// set the default + } + } + } function clickButton(event) {