Files
zulip/web/templates/copy_code_button.hbs
Deekshith S Shetty 596abf6190 popovers: Add Copied! tooltip when copy code button is clicked.
`copy code` button now show a `Copied!` tooltip when clicked.
It implements a similar function used on `saved as draft` notice.

We need to modify the copy_code_button template to limit
data-tippy-trigger to not include click; otherwise, repeated clicks to
copy code will incorrectly also display the "Copy code" tooltip
alternating with "Copied".

Fixes part of #21036.
2023-04-24 11:10:19 -07:00

4 lines
210 B
Handlebars

<button class="btn pull-left copy_button_base copy_codeblock" data-tippy-content="{{t 'Copy code' }}" data-tippy-trigger="mouseenter" aria-label="{{t 'Copy code' }}">
{{> copy_to_clipboard_svg }}
</button>