copy_message_button: Use `div` HTML tag instead of `button`.

For some reason, browser is treating clicking on the button as
submitting the form, which results in the page getting redirected
to the same page with an additional empty query `?` in the URL.
This commit is contained in:
Aman Agrawal 2023-03-18 10:20:58 +00:00 committed by Tim Abbott
parent e65e78719d
commit 83423bb45b
2 changed files with 13 additions and 5 deletions

View File

@ -597,10 +597,18 @@ li,
}
.copy_message {
float: right;
position: relative;
top: 27px;
left: -10px;
margin-top: -24px;
cursor: pointer;
top: 30px;
/* To make sure the svg doesn't occupy any vertical space. */
margin-top: -30px;
right: 2px;
padding-top: 2px;
#clipboard_image {
margin: 0;
}
}
#copy_generated_invite_link {

View File

@ -1,3 +1,3 @@
<button class="btn pull-right copy_button_base copy_message tippy-zulip-tooltip" data-tippy-content="{{t 'Copy and close' }}" aria-label="{{t 'Copy and close' }}" >
<div class="copy_button_base copy_message tippy-zulip-tooltip" data-tippy-content="{{t 'Copy and close' }}" aria-label="{{t 'Copy and close' }}" role="button">
{{> copy_to_clipboard_svg }}
</button>
</div>