Skip to content

Fix focus on vulnerability details comment

Lorenz van Herwaarden requested to merge fix-vuln-details-comment-focus into master

What does this MR do and why?

Related to #421928 (closed)

On safari, it's not possible to add a comment in the discussions on the vulnerability details page. A button cannot be focused on safari and hence the @focus event does not work. This is fixed by using a textarea instead.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2023-08-14_at_17.12.07 Screenshot_2023-08-14_at_17.11.19
Screenshot_2023-08-14_at_17.12.13 Screenshot_2023-08-14_at_17.11.25

How to set up and validate locally

On safari, but also Chrome or firefox.

Prerequisites

  1. You'll need an EE license
  2. You'll need to have runners enabled (See $2408961 for setting up a runner)
  3. Import https://gitlab.com/gitlab-examples/security/security-reports
  4. Run a pipeline on master

Validate

  1. Go to the details page of a vulnerability that is not in Needs triage state (i.e. it's had a state change and will have a system note to comment on)
  2. Validate that focusing on the "Add a comment" placeholder by tabbing opens up the editor to add a comment
  3. Validate that clicking on the same placeholder also opens the editor

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports