fixed javascript for focus first item on add