fleet/frontend/components/forms/RegistrationForm
noahtalerman a6529cc5b0
Fix form field focus on setup pages (#2336)
- Using componentDidUpdate() to check for currentPage change in setup registration form. Initially tried adding `autofocus` prop to the first `<InputFieldWithIcon />` on each page. As seen in AdminDetails page. Didn't work. I believe React only pays attention to `autofocus` when the <input> is re-rendered.

- Calling focus() on page's first input  when currentPage changes and is true. Using refs callback

- Delaying focus by 300ms using setTimeout because the `.user-registration__field-wrapper` has a transition duration of 300ms. Setting the inputs focus immediately creates a snapping movement and ruins the smooth transition.

Fixes #936
2020-10-21 18:03:39 -07:00
..
AdminDetails Fix form field focus on setup pages (#2336) 2020-10-21 18:03:39 -07:00
ConfirmationPage Upgrade eslint and dependencies (#2255) 2020-07-06 19:31:48 -07:00
KolideDetails Fix form field focus on setup pages (#2336) 2020-10-21 18:03:39 -07:00
OrgDetails Fix form field focus on setup pages (#2336) 2020-10-21 18:03:39 -07:00
_styles.scss Upgrade Bourbon to 5.1.0 and fix deprecation warnings (#1973) 2019-01-03 12:46:55 -08:00
index.js User registration (#453) 2016-11-16 11:58:25 -05:00
RegistrationForm.jsx Upgrade eslint and dependencies (#2255) 2020-07-06 19:31:48 -07:00
RegistrationForm.tests.jsx User registration (#453) 2016-11-16 11:58:25 -05:00