Thank you for reporting this bug. We will make it our priority to review this report.
-
Sencha Premium Member
Show event not fired when the panel is first shown on the screen
Hi,
When we create a panel we add this:
listeners: {
show: function shown(me, eOpts) {
alert("shown");
}
},
However, the event is not fired the first time the panel is created & shown on the screen, this is critical for us, because we need to initiate setup events, especially after the vidget is shown on the screen
The way to overcome this is to call hide and show methods right after "new Ext.Panel" , however this creates its own critical bug (drag issues - opening another bug for that)
I was hoping it will be solved in the latest 2.0.1.1 , but the bug is still there
Omer Paran
Co-Founder & CTO
attracTV
Mobile IL : +972 50-202-4804
omer.paran@attarctv.com
web site: www.attractv.com
twitter: http://twitter.com/attractv
-
Have you tried to use the "painted" event? This event is better for the usecase you are looking for probably.
-
Sencha Premium Member
already tried
the Painted event is also not being called the first time the Vidget is shown on the screen
-
I run this code and the event is fired for me:
Code:
Ext.Viewport.add({
listeners: {
painted :function() {
console.log("test");
}
}
});
How does the code exactly look like, that you are running?
-
Sencha Premium Member
More Info
OK - I further tested what you wrote:
We use Panel in two ways, draggable and non-draggable
I know it will sound weird to you, but painted is NOT fired at all when it is in draggable version and it is fired INDEED when the panel can't be dragged
Your sample was not a panel , but it was not draggable - maybe this is why it worked for you and it is not working for us when we open panel on the screen which are draggable
We also DON'T use the fullscreen option in any panel
-
Sencha User
Re
I have similar issue. The show and painted events do fire when I browse in chrome directly on index.html from my development folder but not working after package or production build. Could anyone shed some light on this?
-
Sencha Premium Member
a work around
This issue is not fixed, our workaround it is a 1.5 seconds timer that after it we assume the Vidget is shown on the screen for the first time - yes, a crude perhaps not 100% reliable fix, but has worked for us so far