There is such a form:

<div tabindex="0" class="image-copy-to-clipboard image-copy-to-clipboard-icon" role="button" data-placement="bottom" data-toggle="popover" data-trigger="focus" title="Press Ctrl+C to copy page ID" data-html="true" data-content="<form><input type='text' placeholder='' value='#{{page.Id}} : {{page.Title}}' autofocus /></form>"></div> 

How to make it so that when you open a pop-up window, with an input field in which there is text, all the text was selected and the focus was on the input field so that you could press ctrl + c and immediately copy it?

    1 answer 1

    There is a special object in JavaScript: Selection . Read about it, it should help. Or input has a select method.