prova a mettere la chiamata a tabindex in un alert e vedi cosa ti tira fuori

dovrebbe partire da 0 se non erro