mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-04 14:57:42 +00:00
fix(client): pin the bash copy button while the command scrolls
The button lived inside the scroll container with sticky/float positioning, so horizontal scrolling dragged it through the command text. It now sits absolutely in a non-scrolling wrapper around the scroller and stays in the corner on both axes.
This commit is contained in:
parent
86d8582535
commit
db34b7163b
1 changed files with 10 additions and 8 deletions
|
|
@ -135,20 +135,22 @@ export default function BashCall({
|
|||
)}
|
||||
>
|
||||
{command && (
|
||||
<div className="relative max-h-[300px] overflow-auto bg-surface-tertiary dark:bg-gray-950">
|
||||
<div className="relative bg-surface-tertiary dark:bg-gray-950">
|
||||
<CopyButton
|
||||
iconOnly
|
||||
isCopied={isCopied}
|
||||
onClick={handleCopy}
|
||||
className="sticky right-0 top-1 float-right mr-1.5 mt-1"
|
||||
className="absolute right-1.5 top-1"
|
||||
label={localize('com_ui_copy_code')}
|
||||
/>
|
||||
<pre className="whitespace-pre-wrap break-words px-3 py-2.5 pr-10 font-mono text-xs">
|
||||
<span className="select-none text-text-tertiary" aria-hidden="true">
|
||||
{'$ '}
|
||||
</span>
|
||||
<code className="hljs language-bash">{highlighted ?? command}</code>
|
||||
</pre>
|
||||
<div className="max-h-[300px] overflow-auto">
|
||||
<pre className="whitespace-pre-wrap break-words px-3 py-2.5 pr-10 font-mono text-xs">
|
||||
<span className="select-none text-text-tertiary" aria-hidden="true">
|
||||
{'$ '}
|
||||
</span>
|
||||
<code className="hljs language-bash">{highlighted ?? command}</code>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{hasOutput && backgroundHandle == null && (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue