JSFiddle - React, Tailwind, and code Playground

by andrew45

HTML

<input value="+7 (___) ___ ____"/>

JavaScript

let input = document.getElementsByTagName('input')[0]
input.addEventListener('focus', (e, el) => {
	e.preventDefault()
})
input.addEventListener('mouseup', (e, el) => {
	e.preventDefault()
	console.log(input.setSelectionRange(4, 4))
})