Skip to content

Fix upload file dialog trigger issue

Mark Florian requested to merge fix-attach-file-button into master

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.

  1. !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.
  2. 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.

Edited by Mark Florian

Merge request reports

Loading