amilner42/habby

Keep focus on same habit after resorting habits

Opened this issue · 0 comments

Currently (with the frequency stats code) when you edit a habit's amount, the focus remains on the same location on the page. E.g. if you edit the second habit on the page then the focus remains on the second habit. Habits are sorted by user progress per habit, so changing a habit's amount often results in a resorting of the habits, and the user is left with a text cursor focused on a different habit's amount input box. This is annoying if you made a mistake entering the amount for that habit and want to fix it—you have to search for the habit you just entered an amount for—so I'd like to change it so that it keeps focus on the same habit after editing.