setSelectionRange() for input/textarea during onFocus fails when mouse clicks. ... The only workaround for chrome is to schedule a setTimeout() timer with a delay of 1ms. Then the selection occurs AFTER the positioning of the cursor. Comment 1 Deleted. Comment 2 …
