Opened 14 years ago

Closed 14 years ago

Last modified 10 years ago

#3692 closed bug (notabug)

Dialog does not display when reopened

Reported by: jburgess Owned by:
Priority: major Milestone:
Component: ui.dialog Version: 1.6rc2
Keywords: Cc:
Blocked by: Blocking:


If I open a dialog box, close it, and then try to re-open it again, the dialog is displayed the first time but not the second time. When the dialog opens the second time, the titlebar is visible but the main dialog contents are not.

My code is as follows:

(dialog html)

          <div class='dialog_wrapper' style='display: none;'>
            <div class='dialog'>

(dialog display code)

          <script type='text/javascript'>
              function open_dialog() {
                    draggable: false,
                    height: 265,
                    width: 350,
                    modal: true,
                    overlay: { 
                        opacity: 0.5, 
                        background: "#000000" 
                    resizable: false

(the link)

          <a href='#' onClick='open_dialog();'>Open dialog</a>

I took a cursory glance, and it appears that the wrapper divs are not being removed when the dialog is closed. Perhaps that is the problem?

Change History (3)

comment:1 Changed 14 years ago by wichert

They are only removed if you destroy the dialog. If you only close the dialog you can reopen it by issuing a show command.

comment:2 Changed 14 years ago by Scott González

Resolution: invalid
Status: newclosed

Wichart is correct. You cannot re-initialize a dialog if it hasn't been destroyed. What you probably want to do is initialize the dialog with autoOpen: false and then have your link call $('.dialog_wrapper').dialog('open');

comment:3 Changed 10 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.