mirror of https://github.com/zulip/zulip.git
copy_code_button: Attach tooltip to body to avoid overlap with parent.
Having tooltip `appendTo` to parent causes it to be trimmed by the size of parent container if the parent doesn't have enough size to include the tooltip. To fix this, we append tooltip to `document.body`.
This commit is contained in:
parent
acbe7ae7a8
commit
0df7c6f1b0
|
@ -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) {
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue