How can I prevent the canvas opened from the PopUpButton from closing when it loses focus?
I have a popup button that launches a canvas that contains a form that the user can submit. I am validating this form and it displays a warning when validation fails. As soon as the user clicks OK on the alert, the canvas launched from the PopUpButton loses focus and automatically closes (its default behavior). PopUpButton._closeOnActivity is private. Any suggestions are greatly appreciated.
0
1 answer
Use PopUpManager and regular button to pull something manually instead of using PopUpButton. Then you can open and close it whenever you want and avoid the default behavior.
var canvas:Canvas = new Canvas();
PopUpManager.addPopUp(canvas, this);
PopUpManager.centerPopUp(canvas);
PopUpManager.removePopUp(canvas);
+2
a source to share