fix: move <pre> outside #prompt-display to prevent innerHTML from destroying it
The renderPromptEntry() function sets innerHTML on #prompt-display, which was wiping out the child <pre id="last-prompt"> element. This caused copyPromptToClipboard() to fail silently and the display to appear empty. Fix: keep <pre> as a hidden sibling outside #prompt-display, used only as a text buffer for the copy function.
This commit is contained in:
@@ -586,9 +586,9 @@
|
||||
</div>
|
||||
|
||||
<!-- Prompt display subsections -->
|
||||
<div id="prompt-display" style="max-height: 60vh; overflow-y: auto;">
|
||||
<pre id="last-prompt" style="white-space: pre-wrap; word-break: break-word; background: #1a1a1a; padding: 0.75rem; border-radius: 4px; font-size: 0.8rem; line-height: 1.4; margin: 0;"></pre>
|
||||
</div>
|
||||
<div id="prompt-display" style="max-height: 60vh; overflow-y: auto;"></div>
|
||||
<!-- Hidden buffer for copy-to-clipboard raw text -->
|
||||
<pre id="last-prompt" style="display: none;"></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user