Browse Source

add auto focus on textarea when we open DMs

readme-update
Simon Grim 9 years ago
parent
commit
3d92f85410
  1. 6
      js/twister_directmsg.js

6
js/twister_directmsg.js

@ -212,7 +212,8 @@ function openDmWithUserModal(peerAlias) {
requestDmConversationModal(modal.self.find('.direct-messages-thread').empty(), peerAlias); requestDmConversationModal(modal.self.find('.direct-messages-thread').empty(), peerAlias);
$('.dm-form-template').children().clone(true) $('.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) { function openGroupMessagesModal(groupAlias) {
@ -267,7 +268,8 @@ function openGroupMessagesModal(groupAlias) {
); );
$('.dm-form-template').children().clone(true) $('.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} }, {groupAlias: groupAlias, modal: modal}
); );

Loading…
Cancel
Save