Opened 12 years ago
Closed 11 years ago
#9147 closed defect (fixed)
dojox.widget.Dialog opacity issue after calling show()
Reported by: | Josh Trutwin | Owned by: | dante |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | DojoX Widgets | Version: | 1.3.0 |
Keywords: | dojox.widget.Dialog opacity invisible show | Cc: | |
Blocked By: | Blocking: |
Description
dojox.widget.Dialog's show method sets opacity to 0 for 3 items, the domNode, the container, and the closeNode. _showContent() only restores one of these 3 opacities (the container), so if you use show() to show a dialog, you get an invisible dialog cause the domNode's opacity is zero. I have a 2 line patch to fix which I'll post soon, have to run now....
Attachments (2)
Change History (9)
Changed 12 years ago by
Attachment: | 9147.patch added |
---|
comment:1 Changed 12 years ago by
Created a patch - for what it's worth this doesn't seem to be a problem in the existing dialog tests, it only manifested itself when I was using show() in an custom Dialog based on this so maybe something in this.inherited(arguments) inside show() is setting the opacity for closeButtonNode and domNode back to 1? The patch seems to be a good thing to do though regardless and it's not too many bits.
comment:3 Changed 12 years ago by
From talking to Karl, it appears the easiest way to get this behavior is to call show() on a dialog that's already visible.
Load up test_Dialog.html, click the first dialog test button, then open firebug and type:
dijit.byId('firstTest').show();
Dialog disappears.
comment:4 Changed 12 years ago by
so even after applying the patch, calling .show() twice hides the dialog indefinitely. please adjust the patch to include a new dialog test which shows a dialog and the dialog contains a button to re-call show() on that id (or something similar) to illustrate what is "wrong" here, and to ensure the patch fixes whatever it is (at this moment I'm unclear other than calling show() twice hides a dialog)
Changed 12 years ago by
Attachment: | 9147-2.patch added |
---|
comment:5 Changed 12 years ago by
Updated the patch, including a test case and actually fixing the problem. dijit.Dialog showed me the way, when show() is called on a dijit.Dialog it checks if the dialog is already open and if so it just returns, I added this to the top of dojox.widget.Dialog's show and now can call show() as many times as you want on an open Dialog.
Not sure if this has any repercussions, I left in the opacity updates in _showContent() as they seemed like the right thing to do regardless.
comment:6 Changed 11 years ago by
Milestone: | tbd → 1.4 |
---|---|
Status: | new → assigned |
comment:7 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Setting opacity in _showContent