Opened 12 years ago

Closed 11 years ago

#6370 closed defect (worksforme)

Dialog: onLoad does not check for visibility like layout()

Reported by: guest Owned by: bill
Priority: high Milestone: 1.2
Component: Dijit Version: 1.1.0
Keywords: dialog onload visibility hidden Cc:
Blocked By: Blocking:

Description

In version 1.1.0, when you create a dijit.Dialog the css has been changed from display: "none" to visibility: "hidden" when compared to pre-1.1.0.

I noticed that my dialog boxes were being hidden but the div's were centered in the middle of my screen, and the textbox's within the Dialog were editable even though I couldn't see them.

At line 387 in the layout() function of diji\Dialog.js you do a check to make sure that the dialog isn't hidden before calling _position() which places the dialog in the middle of the screen. However, at line 201 of the same file, in the onLoad() function you do not perform the same check which results in a dialog box that is invisible to the user but still editable.

I think the onLoad function should look like this:

onLoad: function(){ summary: when href is specified we need to reposition the dialog after the data is loaded

if(this.domNode.style.visibility != "hidden"){

this._position();

} this.inherited(arguments);

}

Change History (3)

comment:1 Changed 12 years ago by bill

Milestone: 1.1.1
Owner: set to bill
Status: newassigned

comment:2 Changed 12 years ago by bill

Summary: dijit.Dialog onLoad does not check for visibility like layout()Dialog: onLoad does not check for visibility like layout()

I tested http://download.dojotoolkit.org/release-1.1.0/dojo-release-1.1.0/dijit/tests/test_Dialog.html (the button for "slow loading href dialog") but I'm not seeing an issue. Can you provide a test case (and list at least one browser where it fails)?

comment:3 Changed 11 years ago by bill

Resolution: worksforme
Status: assignedclosed

Closing since no test case (or response)

Note: See TracTickets for help on using tickets.