Colorbox has ceased working for me on Chrome 27.0.1453.93 (OSX 10.8.3)

When clicking on an image the colorbox appears with the loading graphic and just hangs.

I get an "Uncaught Error: NotFoundError: DOM Exception 8 " error in the dev tools console.

Call stack (using uncompressed colorbox):


Uncaught Error: NotFoundError: DOM Exception 8 jquery.js:125
c.extend.clean jquery.js:125
c.buildFragment jquery.js:121
c.fn.extend.domManip jquery.js:120
c.fn.extend.append jquery.js:114
publicMethod.prep jquery.colorbox.js:570
(anonymous function) jquery.colorbox.js:810

Comments

jacklmoore’s picture

Hi, Colorbox's author here. I had another user report this problem and a potential fix. However, I haven't been able to reproduce the issue (using OSX 10.8.3 and jQuery 1.9.0). He replaced the following line in jquery.colorbox.js:

$(photo = new Image())

With essentially this:

	photo = $('<img>').get(0);
	$(photo)

I don't suppose you could try this and tell me if it resolves your problem as well? If that does fix the issue, could you also try the following:

	photo = new Image();
	$(photo)

At this point I don't understand what could be wrong with the original code. And my apologies, I wouldn't ask for this if I could reproduce it myself.

tripper54’s picture

Hi Jack. Thanks for the quick response. I tried both of the fixes above. The first one worked, but the second one did not.

Hope this helps.

tripper54’s picture

Not sure if this helps - I just fired up a winXP virtual machine that had chrome 26 installed on it. Colorbox worked fine.

I then updated chrome to the latest version - 27.0.1453.94 m . Now colorbox is broken, with the same error.

jacklmoore’s picture

Thanks, I'm happy to get confirmation that it resolved the issue. I committed an update to Colorbox earlier with a similar change as to what worked for you. Instead of using photo = $('<img>').get(0);, it used photo = document.createElement('img');

I couldn't verify that it resolved the issue, but it *should* since jQuery also uses document.createElement. I've never run into an issue with creating DOM img objects with new Image() before, so it may just be a temporary Chrome bug.

tripper54’s picture

Status: Active » Closed (fixed)

The latest version solves the issue, thanks again.