#8247 closed defect (fixed)
[cla][patch] dojo._abs returns wrong x, y in FF3 and Safari when there is an html border
Reported by: | nic | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.3 |
Component: | HTML | Version: | 1.2.1 |
Keywords: | coords, _abs, position | Cc: | |
Blocked By: | Blocking: |
Description
There is a bug even in IE when body and html have a border (eg in quirks mode html has a "medium" border-width in IE); I have to investigate in depth this problem. The patch fixes the FF3 bug, removes a unused var, a var redeclaration and adds an extreme optimization (...) using << 1 instead of *2...
Attachments (3)
Change History (14)
Changed 12 years ago by
Attachment: | testCoords.html added |
---|
Changed 12 years ago by
Attachment: | html.js.diff added |
---|
comment:1 Changed 12 years ago by
Component: | General → HTML |
---|---|
Owner: | changed from anonymous to sjmiles |
comment:2 Changed 12 years ago by
Milestone: | tbd → 1.3 |
---|---|
Owner: | changed from sjmiles to bill |
Status: | new → assigned |
comment:3 Changed 12 years ago by
Ah, the border on <body> and <html> in abs.html wasn't working because I hadn't specified style and color.
OK, thanks for the patch and test case, definitely appreciated! I will check the patch in.
comment:4 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:5 Changed 12 years ago by
Summary: | [cla][patch] dojo._abs returns wrong x, y in FF 3 when there is an html border (see test). → [cla][patch] dojo._abs returns wrong x, y in FF3 and Safari when there is an html border |
---|
comment:6 Changed 12 years ago by
Safari had the same problem (due to a different bug in the code). Fixed in [16032].
comment:7 follow-up: 9 Changed 12 years ago by
I'm seeing an issue on IE where the ABS returned isn't right on IE, even after this patch. Here is my setup:
table with two cells, right cell contains a widget. I call dojo.coords on the widget DOM node. I use those values to put an overlay div ontop of the widget in certain circumstances. The overlay is offset from the widget by two pixels in x and y direction. It's ALMOST right, but not quite.
comment:8 Changed 12 years ago by
comment:9 Changed 12 years ago by
My patch was for FF3 only, I haven't fixed the IE case yet. IIRC IE has a problem even if body borderWidth is != 0px
nic
Replying to jaredj:
I'm seeing an issue on IE where the ABS returned isn't right on IE, even after this patch. Here is my setup:
table with two cells, right cell contains a widget. I call dojo.coords on the widget DOM node. I use those values to put an overlay div ontop of the widget in certain circumstances. The overlay is offset from the widget by two pixels in x and y direction. It's ALMOST right, but not quite.
comment:10 Changed 12 years ago by
The last patch is a workaround for IE (quirks mode): a "medium" border-width (default value) property on body or html is 4px when set by the user, 2px when set implicitly by the browser
I'll take a look at this, although I'm confused as to why tests/_base/abs.html didn't find any problems... it specifically puts border on <html> and <body>