fixed focus problem in js