# New Personal Message initial focus should be on user-selector

**URL:** https://meta.discourse.org/t/new-personal-message-initial-focus-should-be-on-user-selector/48272
**Category:** UX
**Created:** [August 5, 2016, 10:01pm UTC](https://meta.discourse.org/t/new-personal-message-initial-focus-should-be-on-user-selector/48272 "2016-08-05T22:01:12Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 5, 2016, 10:01pm UTC](https://meta.discourse.org/t/new-personal-message-initial-focus-should-be-on-user-selector/48272/1 "2016-08-05T22:01:12Z")

</div>

Continuing the discussion from [Warning/notice that you're sending messages just to yourself](https://meta.discourse.org/t/warning-notice-that-youre-sending-messages-just-to-yourself/48112/6):

> [@Warning/notice that you're sending messages just to yourself](https://meta.discourse.org/t/warning-notice-that-youre-sending-messages-just-to-yourself/48112/1):
>
> we’ve had users send messages to themselves and wondering why they don’t get a response (from the profile page it looks like that’s how you start a new message).

Though warning people that there is no recipient of their message is a good failsafe, I’m continually confused when I start a new PM and the username isn’t completed and then I realize it’s because I’m typing the title. Then after I type the title, I just tab on down to the message body.

I think the UX problem is that the initial focus is on the title, when what I’d expect from a couple decades of writing email is for the user/recipient to be the first thing to enter.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [August 5, 2016, 10:06pm UTC](https://meta.discourse.org/t/new-personal-message-initial-focus-should-be-on-user-selector/48272/2 "2016-08-05T22:06:55Z")

</div>

That’s because the recipient is usually pre-filled, e.g.

- I click your avatar
- I click Message
- your username is already entered in the to: field
- the focus is on the topic title

Why in the world would I need the focus on the recipients field at that point? Intent has already been demonstrated by action, e.g. “I clicked on a person” or “I am on someone’s user page that I wish to speak with”

---

<div class="post-metadata">

### Author: ![Tom\_Newsom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tom_newsom/32/115981_2.png) [@Tom\_Newsom](https://meta.discourse.org/u/Tom_Newsom)
#### Post date: [August 5, 2016, 10:07pm UTC](https://meta.discourse.org/t/new-personal-message-initial-focus-should-be-on-user-selector/48272/3 "2016-08-05T22:07:52Z")

</div>

Well then make Recipient the default focus when it’s empty?

This has caught me out before too.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [August 5, 2016, 10:08pm UTC](https://meta.discourse.org/t/new-personal-message-initial-focus-should-be-on-user-selector/48272/4 "2016-08-05T22:08:11Z")

</div>

In what context is it ever empty? Repro steps?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [August 5, 2016, 10:09pm UTC](https://meta.discourse.org/t/new-personal-message-initial-focus-should-be-on-user-selector/48272/5 "2016-08-05T22:09:04Z")

</div>

I see.

> [@codinghorror](#):
>
> In what context is it ever empty? Repro steps?

The problem happens only when someone starts a message by clicking on the New Message button in the Personal message window.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [August 5, 2016, 10:14pm UTC](https://meta.discourse.org/t/new-personal-message-initial-focus-should-be-on-user-selector/48272/6 "2016-08-05T22:14:30Z")

</div>

Sure @eviltrout in this case, can you make a note next week to check and

- if the recipients field is blank, focus that
- otherwise, focus the title field

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 6, 2016, 6:46am UTC](https://meta.discourse.org/t/new-personal-message-initial-focus-should-be-on-user-selector/48272/7 "2016-08-06T06:46:20Z")

</div>

If the recipient field is blank **or** only yourself focus on it

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [August 8, 2016, 5:57pm UTC](https://meta.discourse.org/t/new-personal-message-initial-focus-should-be-on-user-selector/48272/8 "2016-08-08T17:57:48Z")

</div>

Most of the logic was already in place. I just added the special case for when the username was blank:

[https://github.com/discourse/discourse/commit/01ced67ab39a3055cced66e58c9fcf857f4db920](https://github.com/discourse/discourse/commit/01ced67ab39a3055cced66e58c9fcf857f4db920)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [August 8, 2016, 10:39pm UTC](https://meta.discourse.org/t/new-personal-message-initial-focus-should-be-on-user-selector/48272/9 "2016-08-08T22:39:59Z")

</div>


