Fix disappearing weight input in Firefox
What does this MR do?
This is a Firefox specific bug and it started to happen after we change the input type from text
to number
with https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/7346. I spent quite an amount of time to figure out what was wrong came across with this 4-year-old Firefox bug. It's reported 4 years ago and modified only 9 days ago.
input type=number should not fire extra focus/blur events when script focuses it immediately after inserting it into the document
This is the original issue title from Firefox issue tracker and it's exactly what happens in our case.
I reverted input type to text
since we already have a validation in place for weight input which will reject text values and show a well-designed error message below the input. Here is a little gif to show all possible cases of weight input.
What are the relevant issue numbers?
Closes #7887 (closed)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary - Documentation created/updated
- Tests added for this feature/bug
-
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides - Conforms to the database guides
-
EE specific content should be in the top level /ee
folder - For a paid feature, have we considered GitLab.com plans, how it works for groups, and is there a design for promoting it to users who aren't on the correct plan?