diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour.directive.js index 01d73568ec..eb521312fc 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour.directive.js @@ -264,13 +264,14 @@ In the following example you see how to run some custom logic before a step goes // If the currentStep JSON object has 'skipStepIfVisible' // It's a DOM selector - if we find it then we ship over this step - if(upcomingStep.skipStepIfVisible) { - let tryFindDomEl = document.querySelector(upcomingStep.element); - if(tryFindDomEl) { + if (upcomingStep.skipStepIfVisible) { + let tryFindDomEl = document.querySelector(upcomingStep.skipStepIfVisible); + if (tryFindDomEl) { // check if element is visible: if( tryFindDomEl.offsetWidth || tryFindDomEl.offsetHeight || tryFindDomEl.getClientRects().length ) { // if it was visible then we skip the step. nextStep(); + return; } } }