Profile images disappear when using keyboard Enter/Return

The Profile Background and User Card Background images will disappear when Enter or Return are used after entering other user field data.

Reproduces on meta in Chrome, FF, Safari (Mac).

Steps to reproduce:

  1. Upload images to Profile Background and User Card Background at https://meta.discourse.org/u/username/preferences/profile
  2. Save with the Save button
  3. Place cursor in any available user field and press Enter or Return

At step #3 the Profile Background image will disappear. Press Enter again and the User Card Background will disappear. You now have to abandon your changes and reload to retrieve the images. If not, the user profile is saved without the image(s).

4 Likes

:wave: Thanks for the detailed repro, much appreciated :heart:

This should fix it, see commit description for details:

https://github.com/discourse/discourse/pull/8198

@sam @awesomerobot my recommendation would be to add the type="button" by default to d-button component, I added support for type months ago, and I think we should go further than this. It’s so easy to create this kind of unexpected behaviour.

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.