Opened 4 years ago

Closed 4 years ago

#18717 closed defect (fixed)

exception calling getIeDocumentElementOffset() on IE11

Reported by: dylan Owned by: bill
Priority: high Milestone: 1.9.8
Component: Core Version: 1.10.4
Keywords: Cc:
Blocked By: Blocking:

Description

I've received a report that https://github.com/dojo/dojo/blob/db66e918cd5a736fa4023741ace82e1bdc0fb612/dom-geometry.js#L434 is causing an issue within IE11, with the vague details of:

Error: Object doesn't support property or method 'getIeDocumentElementOffset'

The likely cause is that we need a feature test here, rather than a UA sniff. We should check this for IE11 and Edge.

Change History (6)

comment:1 Changed 4 years ago by bill

Hmm, that is vague, and mysterious. There's no point to adding any feature tests here though. You could simply change

if(has("ie")){
        geom.getIeDocumentElementOffset = function getIeDocumentElementOffset(/*Document?*/ doc){
              ...
        };
}

to be:

geom.getIeDocumentElementOffset = function getIeDocumentElementOffset(/*Document?*/ doc){
      ...
};

Better yet, since we desupported IE6 and IE7 years ago, you can change that whole code block to be:

geom.getIeDocumentElementOffset = function(/*Document?*/ doc){
        return {
                x: 0,
                y: 0
        };
};

... and then stop calling that method internally, since it doesn't do anything.

BTW, the only way the user could be hitting that error is if both has("ie") and has("dom-addeventlistener") are falsy. So I doubt the problem is happening on IE11 as they claim. Probably it's something weird with an embedded browser based on IE code.

comment:2 Changed 4 years ago by bill

PS: The call to has("dom-addeventlistener") in normalizeEvent() is goofy, since it's really trying to test whether events define pageX/pageY. But I guess it's good enough.

comment:3 Changed 4 years ago by bill

Owner: set to bill
Status: newassigned

I'll fix this one; I'm doing some other fixes in core now.

comment:4 Changed 4 years ago by bill

Summary: dojo/dom-geometry IE11 feature detectionexception calling getIeDocumentElementOffset() on IE11

comment:5 Changed 4 years ago by bill

Milestone: 1.111.9.8

comment:6 Changed 4 years ago by bill

Resolution: fixed
Status: assignedclosed

Fixed in a7a5646855dfe5b25f6b0c1e1c447a9b7342c110 and more cleanup in 779e4e2315418ce406262540891ee8db3017f65a.

Backported in bde5d981f570a1c95b3fbb038f7edc77d97c3757 and 0aa20f7df1048587eae5b316d8861a33900f637b.

Note: See TracTickets for help on using tickets.