Skip to content

Fix "Stay on Page" alert showing in empty snippet

What does this MR do?

This MR fixes that the user is prompting whether the user wants to stay on the page or leave when they refresh or click "Cancel" on a snippet page.

Now, when all fields are empty, the user will not be prompted before navigating.

Link to page: /-/snippets/new

Related to #262102 (closed)

Screenshots (strongly suggested)

Before After
image the user will be sent to /dashboard/snippets

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Kev

Merge request reports