[Vuejs]-How to position cursor in search field after placeholder

0👍

You cannot do this given your current setup.

The reason being that the cursor appears at the same place that the placeholder text starts. So, no matter how you alter the placeholder text, or the cursor, they will always begin at the same place.

If you wish to disconnect the cursor from the placeholder text, then you will need to create separate elements in order to accomplish that. For example, using a label, or a div, or a span, or some combination of elements to have the text out of the flow of the document in order for it to be removable and separate from altering the layout. In addition, this would mean implementing the placeholder logic, or leaving the placeholder in place as a label.

Leave a comment