AFv3.0 - Event "panelunload" triggered twice during panel unloading. Is this expected? #903
Description
Hi,
i was surprised (with a bad programming decision on my side) when i was "confronted" with the "panelunload" event being triggered twice when unloading a panel. I was sure that i was doing something wrong (code was a mess :(( ) -- and it still can be something wrongly understood on my code also on the testcode attached bellow.
So doing a very simple code to test it.
- "panelload" is called once
- while "panelunload" is called twice in this sample.
Attached the sample code that reproduces it. I did look at the appframework.ui.js source code, but i don't understand all the nuances to suggest another approach. So for my case, i just decided to check if i already did the unload stuff or not (this is anyway good practice i think).
event_loadpanel-test.html.txt
Also attached a image of the stack trace showing where the double call is generated.
But, decided to rise this issue so eventually some other person also is having this behavior and/or it's really something that needs to be changed.
Thanks
-wm