Flex Popup Modal and HTML Text Issues

Written by

I found an interesting couple of issues today whilst working with Popup’s. Due to time this post is brief but to the point and below is a link to an example (with source) of the issues with fixes.

1) Firstly I was passing an Object to the Popup with the data to display and discovered if this Object data is a String of HTML text to be displayed in an TextArea then casting the Object to String causes the HTML text to be rendered incorrectly. Quick Fix: Cast Object to XML then to String.

2) Secondly I had an effect on the closing of the popup window and noticed that the modal layer beneath the popup was being removed after the popup effect had finished and ultimately removed which looked cr@p. Quick Fix: Dispatch a flex hide event from within the popup when the closing animation method is called.

Popup Example