Opened 14 years ago
Closed 11 years ago
#4975 closed bug (wontfix)
Dialog: Cannot modify zIndex option after init
Reported by: | betobaz | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.10.0 |
Component: | ui.dialog | Version: | 1.7.2 |
Keywords: | zIndex | Cc: | |
Blocked by: | Blocking: |
Description (last modified by )
.dialog('option', 'zIndex', val) doesn't do anything if the dialog is already open.
Change History (14)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Description: | modified (diff) |
---|---|
Summary: | Problema con dialog('option','zIndex',value), [Posible solucion] → Dialog: Cannot modify zIndex option after init |
comment:3 Changed 13 years ago by
Milestone: | TBD → 1.8 |
---|
comment:4 Changed 13 years ago by
Sorry, i'm from Mexico and i don't speaking english very well. Using UI Dialog I find that zIndex allocation does not work, in jquery-ui-1.7.2.custom, the _setData function don't have the case for zIndex. The solution that i give is the follow:
case "zIndex":
this.uiDialog.css("z-index",value); (this.overlay&&this.overlay.$el.css("z-index",--value)); break;
I hope that my contribution is helpfull
comment:5 Changed 13 years ago by
I would also like to see this fixed.
The problem seems to be that _setOption is defined in the dialog widget but "zIndex" is not in the switch statement. As a result, you can neither get nor set the zIndex of the dialog. I would say this is a feature, but the documentation says this should work.
In my case, I need to modify the zindex each time the dialog is opened to ensure it opens on top.
comment:6 follow-up: 7 Changed 12 years ago by
This issue seems to be fixed in 1.8.9, see http://jsfiddle.net/AVxGY/
comment:7 Changed 12 years ago by
Replying to adovenmuehle:
This issue seems to be fixed in 1.8.9, see http://jsfiddle.net/AVxGY/
Nope. Your test is only checking that the option has changed, not that the option change has actually had an effect on the ui-dialog element. See http://jsfiddle.net/rdworth/AVxGY/1/
comment:8 Changed 11 years ago by
Milestone: | 1.9.0 → 1.10.0 |
---|
comment:9 Changed 11 years ago by
Status: | new → open |
---|
comment:10 Changed 11 years ago by
Owner: | set to fontzter |
---|---|
Status: | open → assigned |
comment:11 Changed 11 years ago by
Owner: | fontzter deleted |
---|---|
Status: | assigned → open |
A more extensive example is here: http://jsfiddle.net/fontzter/qjeHT/2/
This will likely be resolved in the reworking of zIndex and modality.
A possible workaround is to add the following case to the switch within the _setOption:
case "zIndex": this.uiDialog.css( "z-index", value ); this.options.zIndex = value; // maxZ needs to be reset if the dialog is opened if ( this._isOpen ) { this.moveToTop(); } break;
comment:12 Changed 11 years ago by
Owner: | set to bchiasson |
---|---|
Status: | open → assigned |
comment:13 Changed 11 years ago by
Owner: | bchiasson deleted |
---|---|
Status: | assigned → open |
comment:14 Changed 11 years ago by
Resolution: | → wontfix |
---|---|
Status: | open → closed |
The zIndex option is being removed in 1.10. See https://github.com/jquery/jquery-ui/commit/3829a37ca122e923c3a08b964c4b1a946a2a1456
Please provide the description in english.