Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File Upload: It's possible for the Javascript file upload to fail a reflow on some very long file names #5774

Open
wardt7 opened this issue Mar 5, 2025 · 0 comments
Labels
🐛 bug Something isn't working the way it should (including incorrect wording in documentation) file upload

Comments

@wardt7
Copy link

wardt7 commented Mar 5, 2025

Description of the issue

A screenshot of the file upload component, showing text going outside the bounds of the upload box

As above; it seems there are certain situations where text isn't broken down enough, resulting in it trailing outside the box. The upload component seems to have chosen to split on a dash in the filename:

A screenshot of the file upload component showing that the file name has been split on the dash in the file name, outside the bounds of the file upload box

Steps to reproduce the issue

  • Upload a file to the new component in the documentation, with a very long continuous file name
  • The exact file name used was: (Report _24350 off voucher) - ACFrOgDLElWoz2zzryYatpnNSH9SePbhlir6W6ig5lnoTIqou4o5BTzbkjSvd3ipfzAM2lMs9N1VctdpK7k2m3qokfYedr4Snmppu2JsLjIhD-LZcDdS1tnvYbCuuK0rG5rzZJP1o6iqAoSmljBe.pdf

Actual vs expected behaviour

Expected: The file name reflows correctly to keep all text within the file upload box
Actual: The file name trails outside the file upload box

Environment (where applicable)

  • Operating system: Windows 11
  • Browser: Firefox
  • Browser version: Version 136.0 (64-bit)
  • GOV.UK Frontend Version: 5.9.0
@wardt7 wardt7 added awaiting triage Needs triaging by team 🐛 bug Something isn't working the way it should (including incorrect wording in documentation) labels Mar 5, 2025
@romaricpascal romaricpascal added file upload and removed awaiting triage Needs triaging by team labels Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working the way it should (including incorrect wording in documentation) file upload
Projects
None yet
Development

No branches or pull requests

2 participants