Skip to content

IE9: plupload.getPos returns wrong coordinates #495

Closed
gernotk opened this Issue Feb 21, 2012 · 0 comments

1 participant

@gernotk
gernotk commented Feb 21, 2012

See line plupload.js L485-493:

 if (node && node.getBoundingClientRect && (navigator.userAgent.indexOf('MSIE') > 0 && doc.documentMode !== 8)) {
     nodeRect = getIEPos(node);
     rootRect = getIEPos(root);

     return {
         x : nodeRect.x - rootRect.x,
         y : nodeRect.y - rootRect.y
    };

In case of IE8 the code above does the right thing and does not call the legacy function 'getIEPos'. In case of IE9, however, document.documentMode evals to '9' and, hence, 'getIEPos' is called unintentionally.

So L485 should be rather like:

if (node && node.getBoundingClientRect && ((navigator.userAgent.indexOf('MSIE') > 0) && (doc.documentMode < 8))) {

Thanks!

@gernotk gernotk pushed a commit to gernotk/plupload that referenced this issue Feb 21, 2012
Gernot Kieseritzky fixed issue #495: IE9 plupload.getPos returns wrong coordinates bfe99c2
@gernotk gernotk closed this Feb 21, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.