Opened 11 years ago
Closed 11 years ago
#8047 closed defect (fixed)
IE8: dojo.coords offset off by 2px issue
Reported by: | James Burke | Owned by: | James Burke |
---|---|---|---|
Priority: | high | Milestone: | 1.3 |
Component: | Core | Version: | 1.2.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Investigating DOH failures with IE8, one is with dojo.coords() on an absolute positioned image. Simplified test case derived from DOH test page attached.
It seems like in dojo._base.html, the dojo._getIeDocumentElementOffset() no longer returns a top, left offset of 2, so the reported numbers for the x and y of the absolute positioned element come back as 102 instead of 100.
Attachments (1)
Change History (13)
Changed 11 years ago by
Attachment: | htmlie2.html added |
---|
comment:2 Changed 11 years ago by
Owner: | changed from anonymous to bill |
---|---|
Status: | new → assigned |
comment:3 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:4 Changed 11 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Hmm, for IE8 standards mode, the attached test file still reports 102 and 102 for the x, y coordinates.
Comparing document.documentElement.offsetWidth vs. window.offsetWidth gives a difference of 4 pxs, so I can see where half of that might be used to get the 2px difference. Same with the offsetTop properties. Not sure I like relying on window. Maybe that is the way to go, still need to consider more.
comment:5 Changed 11 years ago by
Owner: | changed from bill to James Burke |
---|---|
Status: | reopened → new |
So I think IE8 still needs to go through getIeDocumentElementOffset() too, and this offset calculated, btw. Need to also consider how RTL might be affected.
comment:6 Changed 11 years ago by
You are right.... I checked in some code for IE8 in [15776], it seems to work in both strict and quirks mode.
It takes into account a margin setting on <html> (admittedly, that has no purpose, but our test case does it), and the scroll of the browser window.
comment:7 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:8 Changed 11 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
The attached htmlie2.html test file (renders in IE8 standards mode) still reports x and y as 102 instead of 100, so I think there is still some work to be done related to the offset. I am going to try to reduce the test case to plain JS and see if I can ask Microsoft about it.
comment:9 Changed 11 years ago by
Summary: | IE8: dojo.coords offset issue → IE8: dojo.coords offset off by 2px issue |
---|
comment:10 Changed 11 years ago by
comment:11 Changed 11 years ago by
Priority: | normal → high |
---|
comment:12 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Place in the dojo/tests/_base directory