Skip to content

Commit

Permalink
Related to shipshapecode#2399, stop key event propagation and default…
Browse files Browse the repository at this point in the history
… behavior when navigation is enabled
  • Loading branch information
karendolan committed Jan 2, 2024
1 parent 50845df commit db4ac5f
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 db4ac5f

Please sign in to comment.