Ticket #6370 (closed defect: worksforme)

Opened 3 months ago

Last modified 2 days ago

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

Reported by: guest Owned by: bill
Priority: normal Milestone: 1.2
Component: Dijit Version: 1.1.0
Severity: normal Keywords: dialog onload visibility hidden
Cc:

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

Changed 3 months ago by bill

  • owner set to bill
  • status changed from new to assigned
  • milestone set to 1.1.1

Changed 3 months ago by bill

  • summary changed from dijit.Dialog onLoad does not check for visibility like layout() to 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)?

Changed 2 days ago by bill

  • status changed from assigned to closed
  • resolution set to worksforme

Closing since no test case (or response)

Note: See TracTickets for help on using tickets.