Disabling an open dialog

42 views
Skip to first unread message

Scott González

unread,
Nov 7, 2009, 12:15:30 PM11/7/09
to jQuery UI Development
There's a ticket requesting dialog buttons to be disabled when the dialog is disabled. The request make sense, but I'm wondering what a disabling an open dialog should actually do. Should it just disable everything it controls or should it also try to disable use of any controls inside the dialog's content?

Andrew Powell

unread,
Nov 7, 2009, 12:16:55 PM11/7/09
to jquery...@googlegroups.com
Whats the use-case scenario for a disabled, open dialog?

2009/11/7 Scott González <scott.g...@gmail.com>:

Scott González

unread,
Nov 7, 2009, 12:27:18 PM11/7/09
to jquery...@googlegroups.com
On Sat, Nov 7, 2009 at 1:16 PM, Andrew Powell <pow...@gmail.com> wrote:

Whats the use-case scenario for a disabled, open dialog?

The use case provided was an ajax submit when clicking a dialog button and disabling the buttons until the ajax request completes. The user thought that disabling the dialog would disable all of its buttons. In general though, I don't know why you would want to be able to disable a dialog.

Richard D. Worth

unread,
Nov 7, 2009, 12:51:18 PM11/7/09
to jquery...@googlegroups.com

2009/11/7 Scott González <scott.g...@gmail.com>

On Sat, Nov 7, 2009 at 1:16 PM, Andrew Powell <pow...@gmail.com> wrote:

Whats the use-case scenario for a disabled, open dialog?

The use case provided was an ajax submit when clicking a dialog button and disabling the buttons until the ajax request completes. The user thought that disabling the dialog would disable all of its buttons. In general though, I don't know why you would want to be able to disable a dialog.

I agree. Maybe we just add the ui-dialog-disabled class, so that the method has more than no effect. If we wanted to go a little further than than, we could create enable and disable events to bind to, but I don't think this case warrants it.

- Richard

Andrew Powell

unread,
Nov 7, 2009, 12:54:29 PM11/7/09
to jquery...@googlegroups.com
A simpler stop-gap might be putting an overlay atop the dialog,
effectively disabling it.

Todd Parker

unread,
Nov 7, 2009, 1:32:07 PM11/7/09
to jquery...@googlegroups.com, jquery...@googlegroups.com
That would work too. Maybe people were requesting this for situations
where a dialog opened another modal dialog over it? Not a great UI
idea, Microsoft stacks dialogs 10 deep sometimes. With each dialog
stacked with a cover div, interaction would be effectively blocked.

The other scenario would be a multiple window environment, like a
desktop metaphor where there are lots of dialogs (app windows) and
just one has focus -- on top and active while all others are unfocused
and sort of disabled.

T

Sent from my iPhone

Richard D. Worth

unread,
Nov 7, 2009, 2:23:23 PM11/7/09
to jquery...@googlegroups.com
On Sat, Nov 7, 2009 at 1:32 PM, Todd Parker <to...@filamentgroup.com> wrote:
That would work too. Maybe people were requesting this for situations
where a dialog opened another modal dialog over it? Not a great UI
idea, Microsoft stacks dialogs 10 deep sometimes. With each dialog
stacked with a cover div, interaction would be effectively blocked.

This is already supported. If you have a modal that opens another modal on top of it, the top one is modal. Once it closes, the one under it is.
 

The other scenario would be a multiple window environment, like a
desktop metaphor where there are lots of dialogs (app windows) and
just one has focus -- on top and active while all others are unfocused
and sort of disabled.

In this case wouldn't you just have that on be modal, rather than calling .dialog('disable') on all those others?

- Richard

Todd Parker

unread,
Nov 7, 2009, 3:03:40 PM11/7/09
to jquery...@googlegroups.com, jquery...@googlegroups.com
I think in the second example, you wouldn't want the modal overlay and you'd want the non-active windows to look not quite disabled but "less active". I don't think that supporting a windowed environment should be a priority, I was just trying to think of scenarios.

Sent from my iPhone

Richard D. Worth

unread,
Nov 7, 2009, 3:40:05 PM11/7/09
to jquery...@googlegroups.com
Oh, I get your example now. I agree, something like this would be useful in a windowed environment. Also agree, shouldn't be a priority. Even in this example, I think it would make more sense to style the dialog with the focus as active rather than actually disable the other dialogs.

- Richard

Richard D. Worth

unread,
Nov 7, 2009, 3:42:39 PM11/7/09
to jquery...@googlegroups.com
I think we're saying the same thing. My take is, if they should 'look not quite disabled but "less active"' then you shouldn't call .dialog('disable') on them

- Richard
Reply all
Reply to author
Forward
0 new messages