focus management and strange pushSelection() fixed