Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
copy_code_button: Attach tooltip to body to avoid overlap with parent.
Aman Agrawal0df7c6f1b0c8
diff --git a/static/js/tippyjs.js b/static/js/tippyjs.jsindex 650a3e4c639..9a70bf0d5b9 100644--- a/static/js/tippyjs.js+++ b/static/js/tippyjs.js@@ -178,7 +178,7 @@ export function initialize() {});delegate("body", {- target: ".rendered_markdown time",+ target: [".rendered_markdown time", ".rendered_markdown .copy_codeblock"],allowHTML: true,appendTo: () => document.body,onHidden(instance) {diff --git a/static/templates/copy_code_button.hbs b/static/templates/copy_code_button.hbsindex 41e56c1878b..547c172ede5 100644--- a/static/templates/copy_code_button.hbs+++ b/static/templates/copy_code_button.hbs@@ -1,3 +1,3 @@-<button class="btn pull-left copy_button_base copy_codeblock tippy-zulip-tooltip" data-tippy-content="{{t 'Copy code' }}" aria-label="{{t 'Copy code' }}">+<button class="btn pull-left copy_button_base copy_codeblock" data-tippy-content="{{t 'Copy code' }}" aria-label="{{t 'Copy code' }}">{{> copy_to_clipboard_svg }}</button>