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

UNarmed’s picture

I 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?

frjo’s picture

The 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.

UNarmed’s picture

Great 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?

UNarmed’s picture

Sorted thanks, i just changed it from the minified version to the developer one =] Thanks again for the help!

Neslee Canil Pinto’s picture

Status: Active » Fixed
Neslee Canil Pinto’s picture

Status: Fixed » Closed (fixed)