Opened 12 years ago
Closed 5 years ago
#8543 closed enhancement (wontfix)
implied units of measurement for absolutely positioned elements in ie (but not ff or safari)
Reported by: | ptwobrussell | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | high | Milestone: | 1.11 |
Component: | HTML | Version: | 1.2.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
I noticed tonight that IE (7) allows you omit units of measurement when styling something that is absolutely positioned. So you can say:
dojo.style("foo", { position : "absolute", top : 200 //ok to omit units for ie. it assumes pixels });
For Firefox (3) and Safari (latest) however, you have to provide an explicit unit of measurement -- which in the previous case means providing "200px" for "top". If you don't provide those units of measurements, the style simply does not apply at all and you're left wondering where your node is at (which in many/most cases, it simply won't even be visible on the screen.)
To put an interesting twist on this though - FF and Safari did accept an integer value without the "px" when in quirks mode, but when providing a strict doctype, they did not. So, I guess that makes sense...sort of.
I recommend we provide the "px" implicitly whenever someone is using dojo.style for an absolutely positioned elements. This seems like one of those edge cases that Dojo should be eliminating across the board.
If this seems reasonable, I can provide the patch -- hopefully won't add too many bytes to Base.
Change History (5)
comment:1 Changed 12 years ago by
Component: | Core → HTML |
---|---|
Owner: | changed from anonymous to sjmiles |
comment:2 Changed 12 years ago by
Milestone: | tbd → future |
---|
comment:3 Changed 12 years ago by
comment:4 Changed 9 years ago by
Owner: | changed from sjmiles to Eugene Lazutkin |
---|---|
Status: | new → assigned |
Eugene, should we wontfix this one?
comment:5 Changed 5 years ago by
Milestone: | future → 1.11 |
---|---|
Resolution: | → wontfix |
Status: | assigned → closed |
I would be concerned about the size of a patch to fix this: we would have to detect all style values that accept px values? Feel free to work up a patch, but it feels heavyweight.
At the very least though, a doc update seems in order.