Tweak to bring window back to front when already open

Forum for questions and support relating to the 1.24.x releases only.
Locked
dcbour
Posts: 12
Joined: Wed Oct 07, 2009 1:30 am

Tweak to bring window back to front when already open

Post by dcbour »

In firefox (and I suspect other browsers), if you already have a particular window open, clicking a link to reopen (ie Montage, etc), doesn't appear to do anything since the window is open behind the current one. To fix, in the skins/classic/js folder, edit the file skins.js to change function createPopup by adding the last line (in bold) shown.

function createPopup( url, name, tag, width, height )
{
var popupSize = getPopupSize( tag, width, height );
var popupDimensions = "";
if ( popupSize.width > 0 )
popupDimensions += ",width="+popupSize.width;
if ( popupSize.height > 0 )
popupDimensions += ",height="+popupSize.height;
var popup = window.open( url, name, popupOptions+popupDimensions );
if (window.focus) {popup.focus()}
}
Dave
Locked