Skip to content

Fix disappearing weight input in Firefox

Fatih Acet requested to merge _acet-fix-firefox-weight-input into master

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.

_firefox-weight

What are the relevant issue numbers?

Closes #7887 (closed)

Does this MR meet the acceptance criteria?

Edited by Fatih Acet

Merge request reports