Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
docs(input): document the md-select-on-focus directive.
Browse files Browse the repository at this point in the history
Closes #7124

  Closes #7271
  • Loading branch information
devversion authored and ThomasBurleson committed Feb 26, 2016
1 parent 0476809 commit a517eac
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/components/input/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,39 @@ function placeholderDirective($log) {
}
}

/**
* @ngdoc directive
* @name mdSelectOnFocus
* @module material.components.input
*
* @restrict A
*
* @description
* The `md-select-on-focus` directive allows you to automatically select the element's input text on focus.
*
* <h3>Notes</h3>
* - The use of `md-select-on-focus` is restricted to `<input>` and `<textarea>` elements.
*
* @usage
* <h3>Using with an Input</h3>
* <hljs lang="html">
*
* <md-input-container>
* <label>Auto Select</label>
* <input type="text" md-select-on-focus>
* </md-input-container>
* </hljs>
*
* <h3>Using with a Textarea</h3>
* <hljs lang="html">
*
* <md-input-container>
* <label>Auto Select</label>
* <textarea md-select-on-focus>This text will be selected on focus.</textarea>
* </md-input-container>
*
* </hljs>
*/
function mdSelectOnFocusDirective() {

return {
Expand Down

0 comments on commit a517eac

Please sign in to comment.