# Ao pressionar Enter em um campo de usuário personalizado, a página recarrega e os dados são perdidos

**URL:** https://meta.discourse.org/t/pressing-enter-on-custom-user-field-reloads-page-loses-data/117969
**Category:** Bug
**Created:** [Maio 16, 2019, 10:20pm UTC](https://meta.discourse.org/t/pressing-enter-on-custom-user-field-reloads-page-loses-data/117969 "2019-05-16T22:20:04Z")
**Posts on this page:** 6
**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: [Maio 16, 2019, 10:20pm UTC](https://meta.discourse.org/t/pressing-enter-on-custom-user-field-reloads-page-loses-data/117969/1 "2019-05-16T22:20:04Z")

</div>

If a user is editing a custom user text field on their profile and presses enter, the page reloads and the data previously entered into the field is lost.

I tried this on Firefox on Mac and Chrome on Linux.

It’s especially disruptive if the field is one that a user might expect to include returns (e.g., a mailing address). Oh, and it throws away data in any other field that text has been added to.

I’d expect that if you press enter it would submit the data, not merely reload the page.

Has it always been this way?

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [Maio 16, 2019, 11:29pm UTC](https://meta.discourse.org/t/pressing-enter-on-custom-user-field-reloads-page-loses-data/117969/2 "2019-05-16T23:29:24Z")

</div>

It hasn’t. It reproduces here on meta, but not on my v2.3.0.beta9 +184 instance.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [Maio 16, 2019, 11:47pm UTC](https://meta.discourse.org/t/pressing-enter-on-custom-user-field-reloads-page-loses-data/117969/4 "2019-05-16T23:47:44Z")

</div>

Possible lodash regression, will look tomorrow if no one beats me to it.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [Maio 17, 2019, 6:22am UTC](https://meta.discourse.org/t/pressing-enter-on-custom-user-field-reloads-page-loses-data/117969/5 "2019-05-17T06:22:07Z")

</div>

So this is not lodash, it seems like it’s been here for quite some time.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [Maio 17, 2019, 8:40am UTC](https://meta.discourse.org/t/pressing-enter-on-custom-user-field-reloads-page-loses-data/117969/6 "2019-05-17T08:40:39Z")

</div>

Ok that was tricky:

[https://github.com/discourse/discourse/pull/7567](https://github.com/discourse/discourse/pull/7567)

I’m very doubtful it’s a recent regression.

---

<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: [Maio 17, 2019, 9:45am UTC](https://meta.discourse.org/t/pressing-enter-on-custom-user-field-reloads-page-loses-data/117969/7 "2019-05-17T09:45:55Z")

</div>


