Opened 13 years ago
Closed 12 years ago
#7716 closed enhancement (duplicate)
[patch] [cla] Dialog: support multiple (nested) dialogs concurrently on the screen
Reported by: | Ilginy1 | Owned by: | Dustin Machi |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | Dijit | Version: | 1.2beta |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
dojo Library component dijit.Dialog doesnt support multiple (cascaded) Dialogs. More precisely, the previous Dialog isnt disabled like the rest of the screen when a second Dialog is created.
Attachments (2)
Change History (15)
Changed 13 years ago by
Attachment: | Dialog-multipleDialog.patch added |
---|
comment:1 Changed 13 years ago by
We have a patch to enable the Multiple Dialog support which is directly added to the dojo toolkit library file dijit.Dialog.js,
Attached you can find the patch
comment:2 Changed 13 years ago by
Component: | General → Dijit |
---|---|
Milestone: | tbd → 1.4 |
Owner: | anonymous deleted |
Summary: | Multiple Dialog Support is missing → [patch] [cla] Dialog: support multiple (nested) dialogs concurrently on the screen |
Type: | defect → enhancement |
This is a dup of #1411. I see you attached your patch there too.
I wasn't planning to support this for Dialog but I see your patch is only a few lines. If it's really that simple I guess we can add it in. Although I suspect you haven't considered keyboard. Note that this line in Dialog.js (both before and after your patch) connects to <body>:
this._modalconnects.push(dojo.connect(dojo.doc.documentElement, "onkeypress", this, "_onKey"));
comment:3 Changed 13 years ago by
To also consider the hiding with Esc key we updated the patch such that: Incrementing the counter is now placed in the show method instead of setup method And decrementing the counter is placed in hide instead of destroy. (Attached you can find the updated version of the patch) Also a brief description of the patch: A new global variable is introduced which keeps track of the z-index of multiple modal dialogs. Now, the z-index of every new modal dialog is increased, i.e. <div> of 1st modal dialog's underlay : z-index = 998; <div> of 1st modal dialog itself : z-index = 999; <div> of 2nd modal dialog's underlay : z-index = 1000; <div> of 2nd modal dialog itself : z-index = 1001; ... When a modal dialog is created, the global variable is increased. When the modal dialog is closed, then the global variable is decreased. Remarks: 1- A limitation of the patch: Since we handle modalDialogs like a stack here, it is therefore not allowed to programmatically close any of the lower modal dialogs! Reason is that in case of deleting a lower dialog and creating a new one before deleting the upper ones we will get duplicate z-index values again 2- Now it is possible to hide the upper Dialog by ECS key and showing it again
comment:4 Changed 13 years ago by
To also consider the hiding with ECS key we updated the patch such that:
Incrementing the counter is now placed in the show method instead of setup method
Also decrementing the counter is placed in hide instead of destroy.
Also a brief description of the patch:
A new global variable is introduced which keeps track of the z-index of multiple modal dialogs.
Now, the z-index of every new modal dialog is increased, i.e.
<div> of 1st modal dialog's underlay : z-index = 998;
<div> of 1st modal dialog itself : z-index = 999;
<div> of 2nd modal dialog's underlay : z-index = 1000;
<div> of 2nd modal dialog itself : z-index = 1001;
...
When a modal dialog is created, the global variable is increased. When the modal dialog is closed, then the global variable is decreased.
Remarks:
1- A limitation of the patch: Since we handle modalDialogs like a stack here, it is therefore not allowed to programmatically close any of the lower modal dialogs!
Reason is that in case of deleting a lower dialog and creating a new one
before deleting the upper ones we will get duplicate z-index values again
2- Now it is possible to hide the upper Dialog by ECS key and showing it again
comment:5 Changed 13 years ago by
Milestone: | 1.4 → 1.3 |
---|
Hmm, I'm still confused, won't the lower dialog process the ESC key too? And it will try to close?
comment:6 Changed 13 years ago by
For the lower dialog cannot get the focus (due to a lower z-index), the ESC key does not apply to such a dialog.
comment:7 Changed 13 years ago by
So to be sure: what is the current situation with the patch, are you using it or do you need more information?
comment:8 Changed 12 years ago by
I've attempted using this patch in 1.2.1. As briefly mentioned above, keyboard input is not working in input boxes on the nested dialog. This is necessary as my nested dialog contains a form with inputs and a submit button. Everything else appears to work well.
comment:9 Changed 12 years ago by
Owner: | set to Dustin Machi |
---|
Dustin is working on a dialog manager to support this. I'm going to assign this ticket to him for now and see what he comes up with.
comment:10 Changed 12 years ago by
Milestone: | 1.3 → 1.4 |
---|
bumping 1.4 tickets to 1.5, and most 1.3 tickets to 1.4
comment:11 Changed 12 years ago by
Hi, the same problem exists not only for a common forms dialog. I need a solution for using the href-link plugin used in an editor in a dialogwindow. Because the href-plugin odens a tooltip dialog its not possible to input data directly by the keyboard. the only possibility is to have anyware a scratchpad from where you can cut/paste to the inputfields of the opened tooltip dialog. But that is not very convenient.
So we need here a common solution for this multidialog/keyboard problem.
Kind regards Manfred
comment:12 Changed 12 years ago by
I'm in great need of this patch, but after analyzing the sources of both 1.2.3 and 1.3.0 release, there seems to be a few differences between the dijit/Dialog.js file. Could the patch be updated to be compatible with both 1.2.3 and 1.3.0 releases of dijit? Thank you in advance.
comment:13 Changed 12 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Dup of #6759, will check in fix now.
Multiple Dialog patch