Fix upload file dialog trigger issue
What does this MR do and why?
This attempts to fix the "Attach file" button in issuables.
From an internal Slack discussion:
Okay, I now better understand the history of this.
- !126302 (merged) got merged, which changed how we render focus rings for GLFM textareas. This change introduced a bug where the attach file dialog appeared if you clicked on the edge of the textarea.
- To attempt to fix that bug, !137537 (merged) was merged. But, that introduced the bug this thread is about - that is, the attach file button not showing up when it should, and sometimes appearing twice.
There's some hairy legacy code to untangle here (
gl_form.js
,dropzone_input.js
), but I think the easiest solution right now is to revert both merge requests listed above. In my opinion, interaction bugs are worse than slightly incorrect focus ring bugs.(As an aside, it turns out I even created a follow-up issue based on !126302 (merged), but it doesn't look like that's had any activity since creation.)
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
simplescreenrecorder-2023-12-12_17.40.23 | simplescreenrecorder-2023-12-14_16.26.49 |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.