Skip to content

Fix reopening modal when widget is toggled

Savas Vedova requested to merge 387648-fix-reopening-modal into master

What does this MR do and why?

When modal data is set, a modal displays finding details. Closing the modal, collapsing the widget, and re-expanding it causes the modal to be re-opened because we do not reset modal data on collapse. This MR fixes that.

Screenshots or screen recordings

The bug:

modal-the-bug

The fixed version:

modal-the-fix

How to set up and validate locally

  1. Enable feature flag: refactor_security_extension
  2. Create an MR that produces findings
  3. Expand the MR Widget
  4. Click on a finding
  5. Close the modal
  6. Collapse the MR Widget
  7. Re-expand the MR Widget

The fixed version should simply expand the widget. The buggy version re-opens the modal.

MR acceptance checklist

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

Related to #387648 (closed)

Merge request reports