fix: 🐛 ensure prev button html is updated with prevLabel option
The prev button in was not updating its inner HTML to reflect changes made to the prevLabel option in the tour.
Link to issue: https://stackblitz.com/edit/introjs-prevbutton-innerhtml?file=src%2Fmain.ts
Unlike the next button, which updates its label dynamically (https://github.com/usablica/intro.js/blob/master/src/packages/tour/showElement.ts#L639, https://github.com/usablica/intro.js/blob/master/src/packages/tour/showElement.ts#L689, https://github.com/usablica/intro.js/blob/master/src/packages/tour/showElement.ts#L721), the prev button's label was set only once when the button was created.
This fix adds logic to update prevTooltipButton.innerHTML with the current prevLabel option in all relevant places, ensuring the label remains consistent with what is specified in the tour options.
Edit: forgot to mention the issue https://github.com/usablica/intro.js/issues/640
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| intro-js | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Aug 15, 2024 3:04pm |
@marcomafessolli thanks for the PR. We've made some changes to how the library works. Can you please check the latest beta version and see if this issue still repros?
@binrysearch looks like its working nowm no need for my PR anymore. I appreciate your help and responsiveness.