Ticket #8047 (reopened defect)

Opened 2 months ago

Last modified 4 weeks ago

IE8: dojo.coords offset issue

Reported by: jburke Owned by: jburke
Priority: normal Milestone: 1.3
Component: Core Version: 1.2.0
Severity: normal Keywords:
Cc:

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

htmlie2.html (1.2 kB) - added by jburke 2 months ago.
Place in the dojo/tests/_base directory

Change History

Changed 2 months ago by jburke

Place in the dojo/tests/_base directory

Changed 8 weeks ago by jburke

This may be part of #8081.

Changed 7 weeks ago by bill

  • owner changed from anonymous to bill
  • status changed from new to assigned

Changed 7 weeks ago by bill

  • status changed from assigned to closed
  • resolution set to fixed

I think I've fixed this plus did some cleanup, in [15730] and [15731].

Changed 7 weeks ago by jburke

  • status changed from closed to reopened
  • resolution deleted

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.

Changed 7 weeks ago by jburke

  • owner changed from bill to jburke
  • status changed from reopened to 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.

Changed 7 weeks ago by bill

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.

Changed 4 weeks ago by bill

  • status changed from new to closed
  • resolution set to fixed

(In [16052]) Fix dojo.coords() on IE in quirksmode. Patch from Nic (CLA on file), thanks Nic! Fixes #8047, refs #8247 !strict.

Changed 4 weeks ago by jburke

  • status changed from closed to reopened
  • resolution deleted

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.

Note: See TracTickets for help on using tickets.