Fix scrollIntoView function in firefox