Addons-frontend: User should be redirected at the top of the page after submitting a profile update

Created on 16 May 2018  路  7Comments  路  Source: mozilla/addons-frontend

STR:

  1. Log in to AMO-dev
  2. Click on Edit My Profile from the user menu (https://addons-dev.allizom.org/en-US/firefox/users/edit)
  3. Edit one of the available fileds
  4. Click on Update my profile

Actual result
The user remains at the bottom of the page, unable to see the success message that confirms his account update

Expected result:
The user is redirected at the top of the page after he clicks on Update my Profile (this is how it functioned on the legacy pages)

Notes:

  • reproduced on AMO-dev with FF60, Win10x64

profile update

user profile assigned welcome p4 S verified fixed papercut

Most helpful comment

I would prefer we just implement #4998 instead.

All 7 comments

I believe the legacy frontend reloads the page when updating the information, hence the "move to top". I guess we could use the line below in the UserProfileEdit component to scroll to top:

ReactDOM.findDOMNode(this).scrollIntoView();

Do we want to do that?

I would prefer we just implement #4998 instead.

@bobsilverberg #4998 won't cover the scenario in which the user receives an error after submitting a profile update:
error update prof

I would like to work on this issue

I noticed the presence of https://github.com/taion/react-router-scroll in our dependencies, maybe we can use it.

@tsl143 this issue is available if you wish.

Verified fixed on AMO dev with FF60, Win10x64 and Android 7.0
I've also logged #5250 which looks like a regression

page scroll up

Was this page helpful?
0 / 5 - 0 ratings