-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
FIX : prevent tour from closing on left arrow key at first step #568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
FIX : prevent tour from closing on left arrow key at first step #568
Conversation
How about throwing errors if an invalid action is triggered instead of silently ignoring it? I think it would be more helpful for debugging if For |
That's a great suggestion — I agree that throwing errors can be helpful for debugging in many cases. However, for the
|
I think I understand what you mean. Of course, we still have to implement destroying the tour if the right arrow key is pressed on the last step. However, I would suggest handling this logic outside This would be cleaner because In my opinion, if I call the |
Added |
Hi @jarikmarwede , |
Hey, sorry for taking so long to reply. However, I think that changing the functions in general would mean multiple breaking API changes and I don't think @kamranahmedse would merge that anytime soon. I believe it would be best to do these changes in another pull request and have created Issue #575 for discussing this further. I'm sorry I suggested adding the error handling in this pull request. If you force pushed just the first commit and leave the error handling part out of this, I think it is more likely to be merged soon. Also, just to clarify, I am not the maintainer of this project. I just created the issue you are trying to fix with this PR. |
Prevented the tour from being destroyed when pressing the left arrow key on the first step.
Added checks in:
Didn't add the check in handleArrowLeft() to allow client-defined onPrevClick callbacks to run as expected.
Fixes #564