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.
On my page I am using Colorbox twice:
- as supplement of Gallery Formatter powered gallery (big grey loupe on the image)
- as preview for PDF documents (with the help of option to load Colorbox). You can try it by clicking to small loupe in the bottom table (entitled "Související dokumenty")
It is working well, but if you click on the second link displayed in Colorbox, you will see strange "jump" to the beginning of page (position of colorbox-powered gallery?), so you have to scroll down to see the content? How it can be fixed?
Comments
Comment #1
frjo CreditAttribution: frjo commentedDoes the problem disappear if you have only the second set of links on a page?
If it does not, I would suspect that the Google doc viewer has something to do with the jumping of the Colorbox.
Comment #2
milos.kroulik CreditAttribution: milos.kroulik commentedI tried it and the problem is still there. But the cause of the problem doesn't seem to be Google Doc Viewer. I changed it to "http://google.com" and it's still the same. You can look at the page again and try it for yourself.
Comment #3
milos.kroulik CreditAttribution: milos.kroulik commentedchanged the title accordingly.
Comment #4
frjo CreditAttribution: frjo commentedFor me the Colorbox on your page now opens as they should with no "jumping". I tested with Safari and Firefox on Mac OS X.
So it seems that linking to a normal web page, like google.com, works well.
Comment #5
milos.kroulik CreditAttribution: milos.kroulik commentedThat's strange. I created short screencasts, demonstrating this error in Firefox 3.6.6 and IE 8 on Win XP. You can find it at http://drop.io/colorboxjumperror. Both videos should be downloadable, if needed.
Comment #6
milos.kroulik CreditAttribution: milos.kroulik commentedIs there anything else I should try?
Comment #7
frjo CreditAttribution: frjo commentedI have tried to add the same Google link on a local dev site and there I have no jumping problem.
I'm pretty sure you have some other stuff on your site that is interfering with Colorbox.
Comment #8
kmadel CreditAttribution: kmadel commentedI have the same issue here: www.captechconsulting.com/resources/videos
If you click on a video at the bottom of the page, you see the described behavior.
Comment #9
milos.kroulik CreditAttribution: milos.kroulik commentedCan you, please, enclose videos comparable to mine posted above? Just to be sure, that we are both talking about the same issue. Thanks.
Comment #10
frjo CreditAttribution: frjo commentedI found the answer in the Colorbox Google group, http://groups.google.com/group/colorbox/browse_thread/thread/d36607b2e99...
Turn out the "$('input:first').focus()" part at the end of colorbox_load.js is causing the jumping for IFRAME content.
For noe I have committed fixes to 6-dev and 7-dev that simple removes this code from colorbox_load.js.
Please try it out and report back here.
Comment #11
kmadel CreditAttribution: kmadel commentedSeems to work for me.
Comment #12
milos.kroulik CreditAttribution: milos.kroulik commentedYeah, it seems to be fixed! Thanks.
Comment #13
hanoiiSubscribed. On my site, I had only one colorbox and it was scrolling to the end of the page (and leaving the colorbox right on top) instead of the center.
The -dev version fixed that.