diff --git a/build/media_source/plg_system_guidedtours/js/guidedtours.es6.js b/build/media_source/plg_system_guidedtours/js/guidedtours.es6.js index c60927dacc9d4..b0469042c8806 100644 --- a/build/media_source/plg_system_guidedtours/js/guidedtours.es6.js +++ b/build/media_source/plg_system_guidedtours/js/guidedtours.es6.js @@ -374,7 +374,11 @@ function startTour(obj) { break; case 'button': - tour.next(); + ele.addEventListener('click', () => { + // the button may submit a form so record the currentStepId in the session storage + sessionStorage.setItem('currentStepId', obj.steps[index].id + 1); + tour.next(); + }); break; case 'other':