fix: Fix inappropriate scroll behavior when editing contact
fix: Fix inappropriate scroll behavior when editing contact

When I scroll down on the Contacts page and click to edit a contact, I jump to the top of the page. Seems to also happen while filling out the form.

Update: It seems to occur if I reload the page, then navigate from the Dashboard to Connections (or to Login). Then it occurs on either page. But if I stay on Dashboard, it doesn’t occur on the Dashboard. So maybe it’s something wrong with our routing?

Update: I have fixed the scrolling issue, but I think the fix masks the fact that the app is still inappropriately rerendering. I added a callback function to useScroll (in app/app.js) which prevents the scroll behavior whenever the previous and current urls are the same. But when I update a contact, all the contact cards on the page rerender (which you’ll see if you put a console.log statement in the render method). They shouldn’t, and they don’t when I delete or add a contact, or toggle the Compose window open or closed (so the problem probably isn’t because of redux-forms, or with buttons or Submit buttons per se). It probably won’t lead to noticeable problems for now, but ultimately we should figure out what we’re doing wrong and fix it.

Get-In-Touch/get-in-touch,Get-In-Touch/get-in-touch