Commit 1672ca4e by Mitsuhiro Tanda

call clipboard destroy()

parent 3df11900
......@@ -91,7 +91,13 @@ function (angular, _, $, require, config) {
return function(scope, elem) {
require(['vendor/clipboard/dist/clipboard'], function(Clipboard) {
$.fn.modal.Constructor.prototype.enforceFocus = function() {}; // see https://github.com/zenorocha/clipboard.js/issues/155
new Clipboard(elem[0]);
scope.clipboard = new Clipboard(elem[0]);
});
scope.$on('$destroy', function() {
if (scope.clipboard) {
scope.clipboard.destroy();
}
});
};
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment