When the joyride is included on the page but hasn't been started yet,
the keystrokes events are still catched and we end up with a JS error
on `go_next` or `go_prev` functions.
This fix checks that the joyride is on screen before calling theses callbacks.
this.end(this.settings.abort_on_close);
}.bind(this))
- .on("keyup.joyride", function(e) {
- if (!this.settings.keyboard) return;
+ .on("keyup.fndtn.joyride", function(e) {
+ // Don't do anything if keystrokes are disabled
+ // or if the joyride is not being shown
+ if (!this.settings.keyboard || !this.settings.riding) return;
switch (e.which) {
case 39: // right arrow