pagerjs
pagerjs copied to clipboard
withOnShow breaks nested pages
I've been using withOnShow for a while and been working great for me until I came up with this scenario:
I have an outer page, that uses withOnShow, and an inside page. The inside page is shown correctly once, but on subsequent visits to the outer page, the inner-page stops getting displayed:
<div data-bind="page: {id: 'outer', withOnShow: getModel() }">
<div data-bind="page: {id: 'inner', role="start" }">
this page will only show up once when outer is navigated to
</div>
</div>
the getModel does soemthing like this:
return function(callback, page) {
callback( { } );
}
I've got similar issue, but noticed it only after adding guard and if I change the page address by hand (say navigate to #, and then clicking on a link with guard). Debugged a little, seems like all show()s called, but the inner page is still display: none