I have a fullscreen panel with a card layout as the root panel of my app. The first card of this panel contains a tabpanel which is the main app interface and this contains various clickable items which launch a fullscreen carousel. To make the transition between the main app and the carousel seemless I add the carousel to the rootpanel and then switch to it with a swipe effect. When I am done with the carousel I swipe back to the first card (the main app) and then destroy the carousel.
I have a listener on the rootpanel 'cardswitch' event which destroys the carousel if we are going back to the first card. This is fine most of the time but sometimes I notice that my carousel in the second panel disappears before the swipe animation finishes. After some investigation I have discovered that the 'cardswitch' event which is supposed to fire after the animation is complete is sometimes firing before the animation is complete (essentially when the beforecardswitch event should be firing).
This is very annoying as it is intermittent and it is spoiling the UI experience of my app!!