Select web page text input field

I have been using JS to inject text into a web page text input box but don't seem able been able to select the field ie: no flashing cursor.
The text appears fine but i want to select it so there is a flashing cursor, I tried clicking on it but it doesnt give the desired result.

using

this injects the text no problem
image
but
image
doesn't put a cursor in the text box.

if you want to put curser in text box then
why you are using .click();
use .focus(); for set cursor in textbox

No different

what you mean different?

still has no effect, .focus(); has the same effect as .click();, none at all .
.select(); works fine and selects the text so .focus(); may give the box focus but there is no cursor.

Maybe the answer is here:

Read the topic for more options/alternatives

That certainly puts a different view on it.
A bit like the fridge light lol.