Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
pagebeforehide return 'undefined' for ui.nextPage #700
pagebeforehide and pagebeforeshow are returning undefined when referencing ui.prevPage and ui.nextPage. I have tried various different combinations since the documentation states that 'Note that all four of these events expose a reference to either the next page (nextPage) or previous page (prevPage), depending on whether the page is being shown or hidden', but nothing has worked thus far.
I can confirm this issue. I tried all four events and they all behave erratically when exposing the references to nextPage/prevPage.
'pagehide': prevPage is always undefined. nextPage appears as expected
'pagebeforehide': both prevPage and next page are always undefined.
'pageshow': nextPage always undefined, prevPage works as expected
So, these are more consistent now, but the idea is that you'd bind to the div that's being shown or hidden, so "this" refers to the target, and nextPage or prevPage gives you the other page involved in the transition.
That said, the above tests out fine for me so I'm closing this as fixed. Let us know if you run into any issues given the explanation above and we'll be sure to document it better in the end.