View Full Version : Basicdialog acts weird

30 Dec 2006, 9:04 AM

i'm experimenting with the Dialogs for the first time but I'm having some strange problems.
the dialog opens up good and it autocreates elements to build it.

this results in getting more space at the bottom of the page.
if i click on this empty space however the dialog closes and the next time i open the dialog it appears really weird!

http://www.janssendaalen.nl/cms/index_test.php is the site were you can check out the problem.
click on one of the edit buttons to check.
then click under the bottom of the site and open up the dialog again.

probably im doing something terribly wrong but i searched trough the previous forum posts and still werent able to figure out what the problem is.

thanks in advance.
Tommy Maintz

30 Dec 2006, 10:31 AM
Take a look at the generated HTML of a dialog (mgr-website-0) with Firebug. Upon page load, it has the base div, plus 2 proxy divs with z-index 10001,10002,10003. After clicking at the bottom, the page seems to shift a little. Then open the dialog and look at the HTML. It appears that additional HTML is getting added to the mgr-website-0 structure and the z-indexs are hosed. I didn't look to closely at the code, but it looks like maybe you're not re-using the dialog the 2nd time around. The elements still exist in the DOM, but you're adding more elements on top of them. You should follow the examples pattern of lazy-initing the dialogs, so they're only built once.

30 Dec 2006, 1:06 PM
Yeah you are right. Thanks for your reply.
I now see that if you close the dialog it gets hided so i check if the dialog has been initialized now like in the examples.

Still the problem exists that if you click on the white space at the bottom of the page there happens something strange and if you open the dialog again it wont work.

Maybe because it uses visibility instead of display to show and hide it.
Is it a matter of changing the css to get rid of the clickable invisible elements at the bottom?