#10487 closed bug (duplicate)
Top Modal Dialog can't overlay other stacked dialog
Reported by: | carlshe | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.dialog | Version: | 1.11.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When open a new modal dialog, being expected to overlay other existing dialogs, the z-index of its newly created back-overlay seems not correctly set.
I add few lines, referring parts of _moveToTop, to _createOverlay as below:
var zIndicies = this.uiDialog.siblings(".ui-front:visible").map(function () {
return +$(this).css("z-index");
}).get(), zIndexMax = Math.max.apply(null, zIndicies);
if (zIndexMax >= +this.overlay.css("z-index")) {
this.overlay.css("z-index", zIndexMax + 1);
}
And temporarily, the problem seems resolved.
I'm not skilled in development of JQueryUI, so hope somebody could help fixing this.
Thanks!
Change History (2)
comment:1 Changed 9 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:2 Changed 9 years ago by
Just for friendly remind, Because I can't have a look at the newest code of 1.11.1
I add the code closely following the creation of overlay, not in _moveToTop. Why? Because the zIndex of dialog is possible to be changed within _moveToTop. Sometimes nonmodal dialogs could be popup from current Modal dialog. In this case, even the modal dialog get focused again and has its zIndex changed, its back-overlay's zIndex shouldn't be changed accordingly. That means, the zIndex of overlay only needs to be set once while created.
Thanks!
Duplicate of #10138.