Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE9 in IE7-mode: document.body is not yet defined when scrollLeft is called #23

Closed
acutus opened this issue Dec 3, 2012 · 2 comments
Closed

Comments

@acutus
Copy link

acutus commented Dec 3, 2012

For IE9 running in IE7 mode (in an embedded WebBrowser component in a WPF-application) The document.body doesn't seem to be necessarily initialized when the following function is called, resulting in an error saying that : "unable to get value of the property 'scrollLeft' object is null or undefined".

function MouseMove() {
    document.body.scrollLeft;
    document.body.scrollTop;
}

(The little bit of magic in jsxgraph.js, lines 95-98 :) )

This can be avoided just by adding a simple "if(document.body){ ... }" check.

This rather exotic case (IE9 in IE7 mode within a WPF WebBrowser-control, !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN") is currently the only tested one.

@migerh migerh closed this as completed in 7dd1704 Dec 3, 2012
@migerh
Copy link
Member

migerh commented Dec 3, 2012

Thanks for this detailed report. I rebuilt jsxgraph, if you want you can find it here and try it:

http://jsxgraph.uni-bayreuth.de/~michael/jsxgraph-nightly/2012-12-03.1405/

I omitted a test for existence of document because in that case, supportsVML() should return false.

@acutus
Copy link
Author

acutus commented Dec 3, 2012

Whoa, that really was a quick reaction!

Took down the build and everything seems to be running smoothly in the same setup.

Thank you, really a pleasure to report when the reaction is this quick :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants