add auto focus on textarea when we open DMs

This commit is contained in:
Simon Grim 2016-03-30 04:47:23 +05:00
parent d63918dac6
commit 3d92f85410

View File

@ -212,7 +212,8 @@ function openDmWithUserModal(peerAlias) {
requestDmConversationModal(modal.self.find('.direct-messages-thread').empty(), peerAlias);
$('.dm-form-template').children().clone(true)
.addClass('open').appendTo(modal.content).fadeIn('fast');
.addClass('open').appendTo(modal.content).fadeIn('fast')
.find('textarea').focus();
}
function openGroupMessagesModal(groupAlias) {
@ -267,7 +268,8 @@ function openGroupMessagesModal(groupAlias) {
);
$('.dm-form-template').children().clone(true)
.addClass('open').appendTo(req.modal.content).fadeIn('fast');
.addClass('open').appendTo(req.modal.content).fadeIn('fast')
.find('textarea').focus();
}
}, {groupAlias: groupAlias, modal: modal}
);