Skip to content

Add a New Copy Button That Works in Modals

Andrew Fontaine requested to merge copy-button-in-modals into master

What does this MR do?

This copy button manages a local instance of the Clipboard plugin specific to it, which means it is created/destroyed on the creation/destruction of the component. This allows it to work well in gitlab-ui modals, as the event listeners are bound on creation of the button.

It also allows for bindings to the container option of the Clipboard plugin, which allows it to work within the focus trap set by bootstrap's modals.

closes gitlab-org/gitlab-ce#60988

Does this MR meet the acceptance criteria?

Conformity

Performance and testing

Edited by Andrew Fontaine

Merge request reports