#8345 closed feature (fixed)
Dialog: add an option so that it can't be closed by "normal means"
Reported by: | liucougar | Owned by: | liucougar |
---|---|---|---|
Priority: | low | Milestone: | 1.9 |
Component: | Dijit | Version: | 1.2.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
introduce closable option on dijit.Dialog, which is by default true.
If it is set to false, the close button on the titlebar will be hidden, and escape key won't close this dialog.
onExecute/onCancel won't hide the dialog automatically if closable=false
developer has to make sure that, if closable=false is used, some controls (such as buttons) are available in the content of the dialog, so that the end user can close it if some criteria is met
Change History (8)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Summary: | add an option to dialog so that it can't be closed by "normal means" → Dialog: add an option so that it can't be closed by "normal means" |
---|
Almost, except that (as Cougar pointed out to me) the [x] icon still shows up.
BTW, the term modal for that parameter is incorrect, as all Dialogs are modal. Maybe "closable" is a better name, although that too is confusing given that the user can still presumably close the dialog somehow, by clicking on a button in the dialog.
comment:3 Changed 14 years ago by
@bill - I agree the term 'modal' is slightly confusing. Honestly, I thought dojox.Dialog already had a closable param that disabled the X showing up onmouseenter. One line fix to change that. But I still would like to see this behavior in dijit.Dialog officially.
comment:4 Changed 13 years ago by
Milestone: | 1.3 → future |
---|
comment:5 Changed 9 years ago by
Priority: | high → low |
---|
FYI, this is achievable via CSS:
#myDialog .closeButtonNode { display: none; }
Oh, except that doesn't handle using ESC to close the Dialog.
See also #9670, which asks for a similar feature and discusses disabling the ESC key.
comment:8 Changed 9 years ago by
Milestone: | future → 1.9 |
---|---|
Type: | enhancement → feature |
fwiw, this is already possible with dojox.widget.Dialog modal=true
it simply intercepts a connect to dijit._underlay in show() and listens for esc calling dojo.stopEvent(e) when found.