Project

General

Profile

Actions

Defect #44317

closed

Actions dropdown is not closed after copying a link

Defect #44317: Actions dropdown is not closed after copying a link

Added by Mizuki ISHIKAWA 4 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Category:
UI
Target version:
-
Resolution:
Fixed
Affected version:

Description

copyText in app/javascript/controllers/clipboard_controller.js closes the dropdown by looking for the nearest .drdn.expanded element from the clicked element and removing the expanded class from it:

    this.copy(e.currentTarget.dataset.clipboardText);

    const element = e.currentTarget.closest('.drdn.expanded');
    if (element !== null) {
      element.classList.remove('expanded');
    }

Since Patch #44205: Refactor actions dropdown to new dropdown component, actions_dropdown no longer uses that markup: it renders the new dropdown component, which is driven by dropdown_controller and hides its content with the hidden class instead. The selector above therefore matches nothing, and the dropdown is left open.


Files


Related issues 1 (0 open — 1 closed)

Related to Redmine - Patch #44205: Refactor actions dropdown to new dropdown componentClosedMarius BĂLTEANUActions

Updated by Marius BĂLTEANU 4 months ago Actions #2

  • Assignee set to Marius BĂLTEANU
  • Target version set to 7.1.0

Updated by Go MAEDA 3 months ago Actions #3

Wouldn't it be better to include this small fix in 7.0.1 instead of 7.1.0?

Updated by Marius BĂLTEANU 3 months ago Actions #4

  • Related to Patch #44205: Refactor actions dropdown to new dropdown component added

Updated by Marius BĂLTEANU 3 months ago Actions #5

  • Status changed from New to Resolved
  • Resolution set to Fixed

Committed, thanks for catching and fixing the issue.

Go MAEDA wrote in #note-3:

Wouldn't it be better to include this small fix in 7.0.1 instead of 7.1.0?

In 7.0.0, we only introduced the new dropdown component for the account menu. The refactoring of dropdown actions and the context menu has been made in the current trunk for 7.1.0. Please let me know if I'm wrong.

Updated by Marius BĂLTEANU 3 months ago Actions #6

  • Status changed from Resolved to Closed

Updated by Marius BĂLTEANU 3 months ago Actions #7

  • Target version deleted (7.1.0)
Actions

Also available in: PDF Atom