finnsson / pagerjs

The Single Page Application Framework for KnockoutJS
http://pagerjs.com/
MIT License
271 stars 68 forks source link

withOnShow breaks nested pages #197

Open slisznia opened 9 years ago

slisznia commented 9 years ago

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( { } );
}
stiff commented 9 years ago

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