Actions
Defect #44317
openActions dropdown is not closed after copying a link
Resolution:
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
Updated by Mizuki ISHIKAWA 3 days ago
- File 0001-Close-the-actions-dropdown-after-copying-a-link.patch 0001-Close-the-actions-dropdown-after-copying-a-link.patch added
Attached is a patch to fix this.
Updated by Marius BĂLTEANU 1 day ago
- Assignee set to Marius BĂLTEANU
- Target version set to 7.1.0
Actions