react-joyride
react-joyride copied to clipboard
Invalid selector errors are not catched
Hi and thanks for your work!
🐛 Bug Report
When using a "modern" CSS selector such as :has, older browser will fail to use document.querySelector
, which is expected :
Uncaught DOMException: Document.querySelector: '.my-form__field:has(input#name)' is not a valid selector
However, the error is not catched and the whole app crashes (white page).
To Reproduce
Use the reproduction link below or : Try to select an element with a selector that your browser does not support. You can make up a selector that doesn't exist so it will fail regardless of the browser.
Expected behavior
I believe the error should be catched and the step (or tour) skipped. I think it may be a common mistake to think that the selector will fail silently (as they do when using CSS, but not when using querySelector).
Link to repl or repo (highly encouraged)
Try this tour : the second step should crash your page.
Thanks :)