Permalink
Browse files

Merge pull request #6745 from ttaubert/sms/bug-816909-focus-input-mes…

…sage-after-contact

Bug 816909 - [SMS] After picking a contact for a new SMS we should focus the message input field
  • Loading branch information...
2 parents 93dd992 + 9327acb commit ef46bc7d8364849b4fc96053a334df9cdcbba4a0 Francisco Borja Salguero Castellano committed Dec 7, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 apps/sms/js/sms.js
View
@@ -101,18 +101,20 @@ var MessageManager = {
var num = this.getNumFromHash();
if (num) {
var filter = this.createFilter(num);
+ var messageInput = document.getElementById('message-to-send');
MessageManager.currentNum = num;
if (mainWrapper.classList.contains('edit')) {
this.getMessages(ThreadUI.renderMessages, filter);
mainWrapper.classList.remove('edit');
} else if (threadMessages.classList.contains('new')) {
this.getMessages(ThreadUI.renderMessages, filter);
threadMessages.classList.remove('new');
+ messageInput.focus();
} else {
this.getMessages(ThreadUI.renderMessages,
filter, null, function() {
MessageManager.slide(function() {
- document.getElementById('message-to-send').focus();
+ messageInput.focus();
});
});
}

0 comments on commit ef46bc7

Please sign in to comment.