Debug search page probleme on switching tabs

Correction of bug
Add a js to deal with opened tabs in progress