Opened 12 years ago

Closed 12 years ago

#5894 closed enhancement (fixed)

BorderContainer sets style.position to relative

Reported by: Sam Foster Owned by: Adam Peller
Priority: high Milestone: 1.1
Component: Dijit Version: 1.0
Keywords: Cc: Adam Peller, dante
Blocked By: Blocking:

Description

in BorderContainer?.postCreate there's this line:

this.domNode.style.position = "relative";

this precludes me from having making my domNode be position: absolute, or position:fixed - for no good reason. It should be something like:

if(dojo.style(this.domNode, "position") == "static"){

this.domNode.style.position = "relative"

}

"relative", "absolute" and "fixed" all have the same side-effect of setting the node as the positioning parent, and avoiding lots of bugs in IE with the box model and position:static (though if you're setting position:fixed for ie6, you have other issues)

Change History (3)

comment:1 Changed 12 years ago by Sam Foster

Type: defectenhancement

Or, you could just leave it to the .dijitBorderContainer class to set the appropriate position value - I think I saw some comment go by about this, but perhaps I'm missing a reason why it needs to be set inline?

Also, changing this to an enhancement as it doesnt prevent BC from working, just makes extension/customization easier.

comment:2 Changed 12 years ago by bill

Owner: set to Adam Peller

Like you said, I bet setting position:relative in .dijitBorderContainer (rather than setting it inline) would work fine

comment:3 Changed 12 years ago by Adam Peller

Resolution: fixed
Status: newclosed

(In [12497]) Move position:relative to CSS. Fixes #5894 !strict

Note: See TracTickets for help on using tickets.