1
0
mirror of https://github.com/moparisthebest/mail synced 2024-12-23 07:48:48 -05:00

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

View File

@ -459,7 +459,8 @@ define(function(require) {
$timeout(function() { $timeout(function() {
var el = element[0]; var el = element[0];
el.focus(); 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.selectionStart = 0;
el.selectionEnd = 0; el.selectionEnd = 0;
} }