Opened 9 years ago

Closed 3 years ago

#11663 closed defect (patchwelcome)

dojo.marginBox results imply it does not handle negative margins correctly

Reported by: Jared Jurkiewicz Owned by: Eugene Lazutkin
Priority: high Milestone: 1.13
Component: HTML Version: 1.4.3
Keywords: Cc:
Blocked By: Blocking:

Description

dojo.marginBox results imply it does not handle negative margins correctly

A co-worker of mine did some experiments with Marginbox and uncovered it appears to not handle negative margins correctly. He build a testcase demonstrating the issue and it has been attached to this ticket.

Attachments (2)

mb.html (2.6 KB) - added by Jared Jurkiewicz 9 years ago.
Testcase using CDN 1.4
mb15.html (2.6 KB) - added by Jared Jurkiewicz 9 years ago.
Testcase using CDN 1.5

Download all attachments as: .zip

Change History (7)

Changed 9 years ago by Jared Jurkiewicz

Attachment: mb.html added

Testcase using CDN 1.4

Changed 9 years ago by Jared Jurkiewicz

Attachment: mb15.html added

Testcase using CDN 1.5

comment:1 Changed 9 years ago by Jared Jurkiewicz

Results:

Preferences	 
Top Negative Margins
MB Outer::{"l":0,"t":0,"w":588,"h":348}
MB Inner::{"l":44,"t":4,"w":588,"h":348}
CB Outer::{"l":20,"t":20,"w":500,"h":300}
CB Inner::{"l":20,"t":20,"w":500,"h":300}
MB Outer Top Margin::-20
MB Inner Top Margin::-20
No Negative Margins
MB Outer::{"l":0,"t":358,"w":588,"h":388}
MB Inner::{"l":44,"t":402,"w":588,"h":388}
CB Outer::{"l":20,"t":20,"w":500,"h":300}
CB Inner::{"l":20,"t":20,"w":500,"h":300}
MB OuterNN Top Margin::20
MB InnerNN Top Margin::20

Note it isn't taking into account the -20 margin correctly.

Last edited 7 years ago by bill (previous) (diff)

comment:2 Changed 9 years ago by Jared Jurkiewicz

Top Negative Margins
MB Outer::{"l":0,"t":0,"w":588,"h":348}
MB Inner::{"l":44,"t":4,"w":588,"h":348}
CB Outer::{"l":20,"t":20,"w":500,"h":300}
CB Inner::{"l":20,"t":20,"w":500,"h":300}
MB Outer Top Margin::-20
MB Inner Top Margin::-20
No Negative Margins
MB Outer::{"l":0,"t":358,"w":588,"h":388}
MB Inner::{"l":44,"t":402,"w":588,"h":388}
CB Outer::{"l":20,"t":20,"w":500,"h":300}
CB Inner::{"l":20,"t":20,"w":500,"h":300}
MB OuterNN Top Margin::20
MB InnerNN Top Margin::20

comment:3 Changed 9 years ago by bill

Component: GeneralHTML
Owner: changed from anonymous to sjmiles

comment:4 Changed 7 years ago by bill

Owner: changed from sjmiles to Eugene Lazutkin
Status: newassigned

Still happens in trunk (pre 1.8) for width. Height seems to be adjusted correctly on FF/mac, although on IE6 it's over-adjusted, subtracting 60 instead of 40.

comment:5 Changed 3 years ago by dylan

Milestone: tbd1.12
Resolution: patchwelcome
Status: assignedclosed

Given that no one has shown interest in creating a patch in the past 5+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.