I see in the docs that "the leave-function is called right after the user has pressed the next button", and it's not called when the user presses the Back button. However this creates a lot of dirty code: if I want to process the Back button click, I have to put my code inside the Pre function of the previous page.
Is it possible to call the Leave function also on Back button click?
I don't think this can be changed without breaking old scripts but a new callback could perhaps be added.
However, the general pattern is that you initialize the page in pre/show and store/handle any information from that page in the leave callback. If the back button is used you just initialize the page again normally when the user clicks next again...