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

compareDocumentPosition Error #52

Open
thecountofzero opened this issue May 23, 2013 · 0 comments
Open

compareDocumentPosition Error #52

thecountofzero opened this issue May 23, 2013 · 0 comments

Comments

@thecountofzero
Copy link

I am getting the following error when using/loading the jQuery colorbox plugin.

https://github.com/jackmoore/colorbox/blob/master/jquery.colorbox.js

comparing document position cboxLoadingGraphic cboxLoadingOverlay
!!!!!!!!!!! ERROR !!!!!!!!!!!

-message = Cannot read property "childNodes" from null
-fileName = steal/rhino/env.js
-lineNumber = 3480
-name = TypeError

I have identified the line in the plugin to the following line:

https://github.com/jackmoore/colorbox/blob/master/jquery.colorbox.js#L409

Everything works fine in jQuery1.8.3, but breaks when I move to 1.9.1

I noticed that the add function in jQuery has changed in 1.9.1

If I change the following line in env.js in compareDocumentPosition:

if(a.parentNode === b.parentNode){

to

if(a.parentNode && a.parentNode === b.parentNode) {

then things work.

Thoughts?

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

1 participant