Port Vue-based Clipboard Button
The copy_to_clipboard.js
behaviour initializes on page load, so if there are vue-based clipboard buttons that don't exist at page load (such as ones in a GlModal
), they do not have the click handlers associated with the clipboard package.
In gitlab-org/gitlab-ce!28676, a button was added that manages an instance of the clipboard plugin specifically for that component, which means things are bound on mounting and destroyed when the button is, mitigating the above issue. It also has bindings to a particular container available, to work with the focus trap created by our GlModal
.
It's in vue_shared
though, so it should probably be here.