Opened 14 years ago
Closed 14 years ago
#2785 closed defect (wontfix)
Background of ModalFloatingPane has incorrect z-index if multiple ModalFloatingPanes are opened
Reported by: | guest | Owned by: | dante |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Dojox | Version: | 0.4.2 |
Keywords: | Cc: | [email protected]… | |
Blocked By: | Blocking: |
Description
An application creates a pair ModalFloatingPanes? named pane1 and pane2. Pane1 is then caused to be shown. At this point in time, pane1 is shown and the base application is greyed out correctly. While pane1 is shown, pane2 is caused to be shown. At this point in time pane2 is shown and the rest of the application including pane1 is greyed out.
This so far is the expected behavior.
If one then causes pane2 to be hidden, pane1 will still be greyed out with the rest of the application.
The problem seems to be that when a ModalFloatingPane? is shown a recalculation is done of the z-index of all of the ModalFloatingPanes?. However, the z-index is only recalculated for the background div of the ModalFloatingPane? that is actually shown. This causes the ModalFloatingPane? behind it to have a lower z-index than it's background div.
The code in error is in dojo.widget.FloatingPane?.js:
dojo.widget.defineWidget("dojo.widget.ModalFloatingPane?", ...
show:function () { this.showModalDialog(); dojo.widget.ModalFloatingPane?.superclass.show.apply(this, arguments); this.bg.style.zIndex = this.domNode.style.zIndex - 1;
}
A fix that seems to work is to replace the highlighted line with:
var modalFloatingPanes = dojo.widget.manager.getWidgetsByType(this.widgetType); for (var x = 0; x < modalFloatingPanes.length; x++) {
modalFloatingPanes[x].bg.style.zIndex =
modalFloatingPanes[x].domNode.style.zIndex - 1;
}
I will attach a sample HTML file that demonstrates the problem.
Attachments (1)
Change History (5)
Changed 14 years ago by
Attachment: | ModalFloatingPaneBug.html added |
---|
comment:1 Changed 14 years ago by
I seem to have forgotten to sign the defect report.
Shmuel Kallner
IBM Labs in Haifa, Israel
[email protected]…
comment:2 Changed 14 years ago by
Component: | General → Dojox |
---|---|
Owner: | changed from anonymous to dante |
comment:3 Changed 14 years ago by
Status: | new → assigned |
---|
comment:4 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
promise to make sure this is not an issue in 0.9/1.0 FloatingPane?.
welcome reopening with a patch to back port if community desire is great.
A self contained example showing the problem