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.
Please add the setting for returnFocus, as seen in this colorbox faq:
http://www.jacklmoore.com/colorbox/faq/#faq-focus
This solves conflict with existing Jquery code, and also with other CSS hidden objects (ie tabs). This request has been previously made, but since the request was made over 2 years ago I have raised it again.
since some settings have been made available under the custom options selection, it would be easy enough to add this feature.
A full list of settings (for reference) is available here:
Comments
Comment #2
mtraherne CreditAttribution: mtraherne commentedBounce - 1 month.
Comment #3
DarkteK CreditAttribution: DarkteK commentedI had searched all across many posts about this problem, I will explain it again in case any of you are having the same issue:
It turns out when I opened some content with .colorbox and close that modal, some of my js scripts didn't work at all, unless I opened the colorbox again and the only answer for this issue was:
Add the parameter 'returnFocus' => FALSE, I couldn't find where to put this line of code, you need to do this:
- First, update your module to the version 7.x-2.12 or ++
- You can add that parameter where you are declaring the colorbox, example:
$(".div").colorbox({inline:true, returnFocus:false});
Thats the only way I found it can work out well
Comment #4
frjo CreditAttribution: frjo commentedComment #7
frjo CreditAttribution: frjo commentedCommitted to 7.x-2.x and 8.x-1.x.