Skip to content

Fix incorrect handler location for list of branches

What does this MR do and why?

Contributes to #408438 (closed)

Problem

Nothing happens when user clicks on the branch name on commit page. In the JS console appears TypeError: this.querySelector(...) is null.

We use an uncorrect selector for branches expand action. Instead of adding a handle for a special expand button, we use the whole branches block.

Solution

Change handler from .commit-info (block with branches) to .js-details-expand (expand button).

How to set up and validate locally

Screenshot_2023-04-26_at_15.16.19

  1. Open http://127.0.0.1:3000/root/gitlab-test/-/commit/ddd0f15ae83993f5cb66a927a28673882e99100b
  2. Click on ...
  3. You should see all related branches
  4. Click on master
  5. You should be redirected to master branch page

MR acceptance checklist

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

Edited by Vasilii Iakliushin

Merge request reports

Loading