Skip to content

Commit

Permalink
Related to #2399, also stop keydown default behavior when navigation …
Browse files Browse the repository at this point in the history
…is enabled (#2562)

Related to #2399, stop key event propagation and default behavior when navigation is enabled
  • Loading branch information
karendolan authored Jan 21, 2024
1 parent b205857 commit fa893ed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/js/components/shepherd-element.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,21 @@
break;
case KEY_ESC:
if (tour.options.exitOnEsc) {
e.preventDefault();
e.stopPropagation();
step.cancel();
}
break;
case LEFT_ARROW:
if (tour.options.keyboardNavigation) {
e.preventDefault();
e.stopPropagation();
tour.back();
}
break;
case RIGHT_ARROW:
if (tour.options.keyboardNavigation) {
e.preventDefault();
e.stopPropagation();
tour.next();
}
Expand Down

0 comments on commit fa893ed

Please sign in to comment.