Fix error msg in focus-me for non-textarea inputs

This commit is contained in:
Tankred Hase 2014-09-26 17:50:18 +02:00
parent a92a5c5a3f
commit f66fbf592c
1 changed files with 2 additions and 1 deletions

View File

@ -459,7 +459,8 @@ define(function(require) {
$timeout(function() {
var el = element[0];
el.focus();
if (typeof el.selectionStart !== 'undefined' && typeof el.selectionEnd !== 'undefined') {
// set cursor to start of textarea
if (el.type === 'textarea') {
el.selectionStart = 0;
el.selectionEnd = 0;
}