This code snippet provides ways to handle client-side backtracking (the evil back button).
The main problems related to backtracking are:
- Wrong items being selected from WORepetitions after the user backtracked
- A component being asked to perform an action that is inappropriate in the current state, e.g. cancel an edit after committing it
See attachment for code.