Switching slides is unreliable in Firefox

Author: meithecatteCreated Jan 29, 2021Updated Jan 29, 2021

Steps to reproduce:

  1. Create a new deck:
    bash
    npm init code-surfer-deck my-deck
    cd my-deck
    npm start
  2. Open localhost:8000 in Firefox.
  3. Press right arrow a few times.

What will eventually happen is that Code Surfer doesn't react to one right-arrow press, and doesn't advance the step from 1 to 2. Next time the key is pressed, the code will jump instantly to 2 and then animate between 2 and 3.

To reproduce this more reliably, when Code Surfer doesn't respond to a right-arrow press, press the left-arrow instead. This will jump instantly to 2 and then animate back from 2 to 1 - this allows you to observe the behavior when it happens on slide 3 of the example deck, which has only two steps.