Switching views problem

There is the demo on the webpage when there is perfectly working example of switching views. Whenever user changes view month -> anything -> month, the month view remains it cool features like

  • calendar pined to upper part
  • scrolling only on event list part
  • selecting any date scrolls to events on list

No matter how hard I try i cannot make it work even just copying stuff from the website with no change applied. It however works on first initialization and works until i change view for the first time.
Reproduction scenario:
Components loads in month view (it works) -> change to other view (hard to say if it works in week view, I guess it not) -> go back to month view (not ok, scroll next to whole component, no auto scrolling)

Edit: Ok not sure how much it matter and how it will actually behave on real device but the problem is only when I simulate a mobile device (chrome iphone 6/7/8/ simulator, from the begining to the end no device change after refresh) It works in regular browser in all scenarios.

Hi Jake, thanks for reporting the problem, I managed to reproduce this in Ionic (tried it with 4 and 5) - but it only happens if

  • it’s in the Chrome simulator
  • the example code is inside ion-content

It worked fine for me on real devices, on both iOS and Android/Chrome.

The problem seems to be, that the div.md-switching-view-cont from the example code has a height:100%, which, for some reason, stops working when the view is switched - seems like a repaint problem, since if I disable and enable the rule from the dev console, it starts to work again - the container will have the correct height, the device will need a resize / orientationchange for the calendar to set the list scrollabe. I need to investigate this further, to see if there’s any fix for this.

Can you confirm that this doesn’t happen on real devices for you as well?