Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
colorbox-bug-ex.png | 602.19 KB | jhr |
Comments
Comment #1
frjo CreditAttribution: frjo commentedThe Colorbox plugin is downloaded separately from the Colorbox module so this it not something I can fix.
Comment #2
wemmies CreditAttribution: wemmies commentedThanks for the provided solution, was thinking the same, #3 is nice, but broken.... Now it's usable, many thanks
Comment #3
pompetardo CreditAttribution: pompetardo commentedI 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.
Comment #4
frjo CreditAttribution: frjo commentedComment #5
Cyclodex CreditAttribution: Cyclodex commentedI 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
Comment #6
David Bell CreditAttribution: David Bell commentedI 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
Comment #7
Cyclodex CreditAttribution: Cyclodex commentedDavid:
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.
Comment #8
David Bell CreditAttribution: David Bell commentedDowngraded to the 1.3.18 plug-in. It did seem al ittle better on the border issue, but everything else seemed flaky
Comment #8.0
David Bell CreditAttribution: David Bell commentedadded -min.js changes