PDA

View Full Version : Tricky bug using Safari, scrolling a card and setActiveItem cover: true



HughP
13 Jun 2011, 6:12 PM
Hi All,

I 've been trying to solve the following little issue for many hours but I can't find any solution by now.

I have created a outer panel containing a docked Toolbar and two inner panels:

panel 1,
panel 2, with long content to use a clearly {scroll: 'vertical'}.

The idea is to use them as a card layout.

I've set also a back button on this Toolbar. And It's handler fires the following line:

outerpanel.setActiveItem(thePanelThatDoNotScroll, {type: slide, direction: right, cover: true, delay: 400});

So, when you play a little bit with the scroll panel and you press the button that fires the line above before the scroll stops, it performs correctly the 'card change' but the scroll panel reappears again. This don't happen the 100% of times because i couldn't identify when exactly this succeed.

I've run by console outerpanel.getActiveItem().getId(); and sencha thinks the non-scroll panel is the active panel.

And then running outerpanel.update(); refreshes correcly the content and shows the non-scroll panel as expected.

By removing cover:true from setActivePanel options all goes right and as I expected but it's a pitty to not be able to use this 'cover' animation...

Thanks. Forgive my bad English.