I really like the example3 style for colorbox but when colorbox loads the next arrow and the right&bottom border don't appear correctly. See pic

This is caused by a bug in jQuery's outerWidth() fixed in version 1.6.2. http://bugs.jquery.com/ticket/9300

As I understand it, Drupal won't have jQuery 1.6+ until Drupal 8.x... #1156860: Offer latest jQuery 1.6.x as an option (currently 1.6.4).

So to to fix the look of example3 hardcode width and height in

sites/all/library/colorbox/colorbox/jquery.colorbox.js
350: loadedHeight = 10;  //$loaded.outerHeight(true); // Jquery Bug fixed in 1.6.2 returns 0 
351: loadedWidth = 10;  //$loaded.outerWidth(true);   // Jquery Bug fixed in 1.6.2 returns 0 

or

sites/all/library/colorbox/colorbox/jquery.colorbox-min.js
search for:    --> replace with 
N=A.outerHeight(!0)  --> N=10
O=A.outerWidth(!0)  --> O=10
 
CommentFileSizeAuthor
colorbox-bug-ex.png602.19 KBjhr
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

frjo’s picture

Category: bug » task

The Colorbox plugin is downloaded separately from the Colorbox module so this it not something I can fix.

wemmies’s picture

Thanks for the provided solution, was thinking the same, #3 is nice, but broken.... Now it's usable, many thanks

pompetardo’s picture

I just make my own style based on example3, in the demos worked fine but in drupal it had the same problem. Thanks for the solutions.

frjo’s picture

Status: Active » Closed (won't fix)
Cyclodex’s picture

I had the same issue, I now used the 1.3.18 Version which worked now with the borders on example 3 style.
* http://www.jacklmoore.com/colorbox
So I just wanted to note this, for others. I am not sure if everything would work just perfect when the module here would download this version instead of the newest. Just a suggestion.

Regards Cyclodex

David Bell’s picture

I am using the 7.x-2.3 module with the 1.4.3 plug-in and apparently this is still a problem.

From the first post would that mean I would need to place that in lines 350 and 351. It does not seems to be the appropriate place. Does it matter where it is placed?

350: loadedHeight = 10; //$loaded.outerHeight(true); // Jquery Bug fixed in 1.6.2 returns 0
351: loadedWidth = 10; //$loaded.outerWidth(true); // Jquery Bug fixed in 1.6.2 returns 0

Also there seems to be no
N=A.outerHeight(!0) or =A.outerWidth(!0) to replace in sites/all/library/colorbox/colorbox/jquery.colorbox-min.js

Cyclodex’s picture

David:

1.4.3 plug-in

That's exactly the problem if you are running with drupal's basic jquery version.
I also had problems with fixing it.
Downgrade your plug-in to 1.3.18 which then should work pretty fine.

David Bell’s picture

Downgraded to the 1.3.18 plug-in. It did seem al ittle better on the border issue, but everything else seemed flaky

David Bell’s picture

Issue summary: View changes

added -min.js changes