-
-
Notifications
You must be signed in to change notification settings - Fork 355
Open
Description
Description:
There is an issue with how the disableKeyboardNavigation and disableDotsNavigation props behave in Reactour. While disableDotsNavigation is correctly activated in the current step, disableKeyboardNavigation is only activated in the next step, allowing users to still navigate through the tour with keyboard input.
Expected Behavior:
Both disableKeyboardNavigation and disableDotsNavigation should behave consistently, being activated in the current step to prevent users from navigating forward or backward while the tour is locked.
Actual Behavior:
- disableDotsNavigation is activated immediately in the current step, which prevents navigation through dots.
- disableKeyboardNavigation, however, is not activated until the next step, meaning users can still use keyboard navigation.
Steps to Reproduce:
const [lockTour, setLockTour] = useState(false);
<TourProvider
steps={steps(setLockTour)}
disableKeyboardNavigation={lockTour}
disableDotsNavigation={lockTour}
/>;
export function steps(setLockTour) {
return [
{
action: (elem) => {
setLockTour(true);
elem.onclick = () => {
setLockTour(false);
};
},
},
];
}
Suggested Fix:
Ensure that disableKeyboardNavigation is activated in the current step, similar to how disableDotsNavigation behaves.
Metadata
Metadata
Assignees
Labels
No labels