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.
Hey i am using mosaic view to display a single image and then a user can click on this image which is then enlarged in colorbox and thus allows him to scroll through a bunch of images associated to the node.
The problem comes in that when the user exits the colorbox, the original image shows by views is replaced by the last image he viewed on the colorbox? I dont have the first clue as to why this is happening and its an integral requirement to a project i am working on so any help would really be appreciated.
Comments
Comment #1
UNarmed CreditAttribution: UNarmed commentedI found something that i think is links to this. When on a node page and i click on a image and scroll through the other images in the node with colorbox, upon closing the colorbox, the browser window automatically moves to the last image viewed in the colorbox. How would i go about deactivating this behaviour?
Comment #2
frjo CreditAttribution: frjo commentedThe Colorbox plugin has a setting for "returnFocus". Check it out at http://www.jacklmoore.com/colorbox/.
You can use hook_colorbox_settings_alter() to add any settings you like to the Colorbox module.
Comment #3
UNarmed CreditAttribution: UNarmed commentedGreat thanks, think this is the setting i am looking for. I changed the "returnFocus" value to false in the jquery.colorbox.js file but it seems to have no effect?
Comment #4
UNarmed CreditAttribution: UNarmed commentedSorted thanks, i just changed it from the minified version to the developer one =] Thanks again for the help!
Comment #5
Neslee Canil PintoComment #6
Neslee Canil Pinto