Opened 11 years ago

Closed 10 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)

9147.patch (697 bytes) - added by Josh Trutwin 11 years ago.
Setting opacity in _showContent
9147-2.patch (1.5 KB) - added by Josh Trutwin 10 years ago.

Download all attachments as: .zip

Change History (9)

Changed 11 years ago by Josh Trutwin

Attachment: 9147.patch added

Setting opacity in _showContent

comment:1 Changed 11 years ago by Josh Trutwin

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:2 Changed 11 years ago by Josh Trutwin

Oh - Patch is against SVN trunk

comment:3 Changed 11 years ago by Josh Trutwin

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 11 years ago by dante

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 10 years ago by Josh Trutwin

Attachment: 9147-2.patch added

comment:5 Changed 10 years ago by Josh Trutwin

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 10 years ago by dante

Milestone: tbd1.4
Status: newassigned

comment:7 Changed 10 years ago by dante

Resolution: fixed
Status: assignedclosed

(In [20143]) fixes #9147 - CLA patch from trutwijd with expanded tests. fixing double-show issue

Note: See TracTickets for help on using tickets.