Open this page in FF.
Click here and enter some text in box and click "Alert".
Now close the dialog and repeat above.
It behaves as expected.

Now repeat the same in Opera.
The second time it will show empty alert.

This issue comes only in jQuery UI version to 1.7.2.
If you change in the code above, the jQuery UI version to 1.7.1, it will work fine.
Even in jQuery UI version to 1.7.2, if you make modal=false, it will work as expected.