Skip to content

This binding selects the text in a input field or a textarea when the field get focused.

License

Notifications You must be signed in to change notification settings

One-com/knockout-select-on-focus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

knockout.selectOnFocus

This binding selects the text in a input field or a textarea when the field get focused.

Click here to see an example

Install

NPM

npm install knockout-select-on-focus

Usage

<input type="text" data-bind="selectOnFocus: true">
Selects all text when the element is focused.

<input type="text" data-bind="selectOnFocus: /^[^\.]+/">
Selects all text before the first period when the element is focused.

<input type="text" data-bind="selectOnFocus: { pattern: /^[^\.]+/, onlySelectOnFirstFocus: true }">
Only select the pattern on the first focus.

License

Knockout.selectOnFocus is licensed under a standard 3-clause BSD license -- see the LICENSE-file for details.

About

This binding selects the text in a input field or a textarea when the field get focused.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •