Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dom-input-select

Selects text on an HTMLInputElement.

npm add dom-input-select
import domInputSelect from 'dom-input-select'

// select the input contents when clicking on it
const onClick = e => domInputSelect(e.target)

document.querySelector('input#my-input')
  .addEventListener('click', onClick)

(as seen in react-autoselect)

About

Selects text on an HTMLInputElement.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages