Skip to content

Keep code dropdown open when focusing clone inputs

What does this MR do and why?

Keep code dropdown open when focusing clone inputs

When you open the code dropdown and click the "Clone with..." URL field, the dropdown closes before the focus takes effect because of the default GlDisclosureDropdown behavior (:auto-close="true")

This MR:

  • Sets :auto-close="false" on the CodeDropdown
  • Closes the dropdown separately when link-type items are clicked

... so that the "Clone with..." URL field can be focused and copied (to examine it before copying, or for browsers without javascript clipboard support/permission)

Changelog: fixed

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
description Clicking any dropdown item closes the dropdown Clicking the "Clone with..." items does not close the dropdown
Clicking the link-type items still closes the dropdown
project overview Screen_Recording_2024-02-21_at_12.52.39 Screen_Recording_2024-02-21_at_12.25.58
folder within repository Screen_Recording_2024-02-21_at_12.40.18 Screen_Recording_2024-02-21_at_12.34.15

How to set up and validate locally

  1. open the code dropdown on the project overview page or on the page for any folder in a repository
  2. try to select the text in the SSH/HTTPS repo URL text box
Edited by Miranda Fluharty

Merge request reports