FIX: Focus on usernames if it's blank when composing a message

This commit is contained in:
Robin Ward 2016-08-08 13:57:05 -04:00
parent a9ae99bf82
commit 01ced67ab3
1 changed files with 3 additions and 1 deletions

View File

@ -69,7 +69,9 @@ export default Ember.Controller.extend({
focusTarget(replyingToTopic, creatingPM, usernames) { focusTarget(replyingToTopic, creatingPM, usernames) {
if (this.capabilities.isIOS) { return "none"; } if (this.capabilities.isIOS) { return "none"; }
if (creatingPM && usernames === this.currentUser.get('username')) { // Focus on usernames if it's blank or if it's just you
usernames = usernames || "";
if (creatingPM && usernames.length === 0 || usernames === this.currentUser.get('username')) {
return 'usernames'; return 'usernames';
} }