Opened 10 years ago

Closed 10 years ago

#9590 closed defect (wontfix)

getMarginBox fails in multiple browsers

Reported by: haysmark Owned by: sjmiles
Priority: high Milestone: 1.4
Component: HTML Version: 1.3.2
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by haysmark)

See the attached test case. If you run the test case in IE or Opera, the offsets are simply not accounting for the border of the offset parent (the document body in this case). In FF you get meaningless values. Affects all versions of Dojo since 1.1.1.

My test results: (should be 20 50 80)

  • IE8 quirks: 0 30 60
  • IE8 strict: 0 30 60
  • FF3.5.1 both: 0 0 60
  • Opera 9.64 both: 0 30 60

Verified working:

  • Chrome 2
  • Safari 4

Attachments (1)

getMarginBox_bug.html (778 bytes) - added by haysmark 10 years ago.
CDN testcase.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 10 years ago by haysmark

Description: modified (diff)
Milestone: tbd1.4
Summary: getMarginBox fails in FF and IEgetMarginBox fails in multiple browsers
Version: 1.1.11.3.2

comment:2 Changed 10 years ago by haysmark

Description: modified (diff)

comment:3 Changed 10 years ago by haysmark

Description: modified (diff)

Changed 10 years ago by haysmark

Attachment: getMarginBox_bug.html added

CDN testcase.

comment:4 Changed 10 years ago by Adam Peller

Owner: changed from anonymous to sjmiles

comment:5 Changed 10 years ago by bill

Component: CoreHTML

comment:6 Changed 10 years ago by Douglas Hays

Resolution: wontfix
Status: newclosed

marginBox().1 returns the style.left value of the node to its offsetParent. static elements have no defined style.left and also different browsers can assign different offsetParents for elements who even have the same immediate parent. Probably a more relevant test would be to compare dojo.position().x instead across all browsers.

Note: See TracTickets for help on using tickets.