Tab switch fix for Firefox and Sarafi