Skip to content

Commit

Permalink
fix progress bar and next button focus
Browse files Browse the repository at this point in the history
  • Loading branch information
binrysearch committed Sep 5, 2024
1 parent 4db5719 commit 9d2c558
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/packages/tour/components/TourTooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const ProgressBar = ({
currentStep: number;
progressBarAdditionalClass: string;
}) => {
const progress = van.derive(() => ((currentStep) / steps.length) * 100);
const progress = (currentStep / steps.length) * 100;

return div({ className: progressClassName }, [
div({
Expand Down Expand Up @@ -215,7 +215,10 @@ const NextButton = ({
},
});

nextButton.focus()
// wait for the button to be rendered
setTimeout(() => {
nextButton.focus()
}, 1);

return nextButton;
}
Expand Down

0 comments on commit 9d2c558

Please sign in to comment.