mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
clipboard: Update clipboard to v2.0.0 to avoid variable name conflict.
It turns out, now we have a new standard way to access clipboard by `Clipboard` method and currently this conflict with the constructor exported by clipboard package. The new update v2.0.0 was released to address this issue. The new version just exports the constructor as `ClipboardJS`. Ref: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard Ref: https://github.com/zenorocha/clipboard.js/issues/468
This commit is contained in:
@@ -59,7 +59,7 @@ function init_email_clipboard() {
|
||||
var copy_email_icon = email_el.find('i');
|
||||
copy_email_icon.removeClass('hide_copy_icon');
|
||||
|
||||
var copy_email_clipboard = new Clipboard(copy_email_icon[0]);
|
||||
var copy_email_clipboard = new ClipboardJS(copy_email_icon[0]);
|
||||
copy_email_clipboard.on('success', copy_email_handler);
|
||||
}
|
||||
});
|
||||
@@ -830,7 +830,7 @@ exports.register_click_handlers = function () {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
new Clipboard('.copy_link');
|
||||
new ClipboardJS('.copy_link');
|
||||
|
||||
$('body').on('click', '.copy_link', function (e) {
|
||||
popovers.hide_actions_popover();
|
||||
|
||||
Reference in New Issue
Block a user