Fix 'Open in your IDE' buttons don’t open the IDE

What does this MR do?

This MR fixes a regression where the new 'Open in your IDE' buttons don’t open VS Code.

The bug is caused by a problem during rebasing (my fault 👋 sorry!) the branch that introduced this change (see !49460 (merged)). After clicking on the button, an event is dispatched. The default event behavior, i.e. opening the associated link, is prevented by default. We want this behavior for the 'Open in your IDE' button though. During rebasing, the original prevent statement slipped back into the code, leading to the button to never open the IDE.

Related to #220957 (closed)

Screenshots (strongly suggested)

image

  1. Go to a project
  2. Click on the “Clone” dropdown
  3. In the “Open in your IDE” section, click on “Visual Studio Code”

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