mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-05 02:41:34 +00:00
fix: copy last code block shortcut copies the Artifacts pane instead of the last code block (#31613)
With the Artifacts pane open, the Copy Last Code Block shortcut put the pane's full HTML document on the clipboard instead of the last code block in the chat. The pane opens on its own whenever a reply contains an HTML block, so the shortcut was wrong in every such chat. The shortcut clicks the last Copy button of chat code blocks on the page, and the Artifacts Copy button carried the same marker class. The pane renders after the messages, so it always won. The marker class is now removed from the Artifacts button. It had no styling attached, so the button looks and works as before. Fixes #31476
This commit is contained in:
parent
d7a74450b5
commit
32e532b459
1 changed files with 1 additions and 1 deletions
|
|
@ -190,7 +190,7 @@
|
|||
|
||||
<div class="flex items-center gap-1.5">
|
||||
<button
|
||||
class="copy-code-button bg-none border-none text-xs bg-gray-50 hover:bg-gray-100 dark:bg-gray-850 dark:hover:bg-gray-800 transition rounded-md px-1.5 py-0.5"
|
||||
class="bg-none border-none text-xs bg-gray-50 hover:bg-gray-100 dark:bg-gray-850 dark:hover:bg-gray-800 transition rounded-md px-1.5 py-0.5"
|
||||
on:click={() => {
|
||||
copyToClipboard(contents[selectedContentIdx].content);
|
||||
copied = true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue