fix: edit-message textarea now fills full message width
Some checks are pending
ci / docker publish / build (amd64) (push) Waiting to run
ci / docker publish / build (arm64) (push) Waiting to run
ci / docker publish / merge manifest + tag (push) Blocked by required conditions

.msg-user has width:fit-content which collapses when body content is replaced
by a textarea. Added .msg-user.editing CSS rule with width:85% !important,
and JS adds/removes 'editing' class during edit flow.
This commit is contained in:
Lukas Parsons 2026-07-07 12:53:03 -04:00
parent c93c14ece9
commit f0031eac11
2 changed files with 4 additions and 0 deletions

View file

@ -4018,10 +4018,12 @@ import { wireArrowUpRecall, getLastUserMessageFromChatHistory } from './composer
bodyEl.innerHTML = ''; bodyEl.innerHTML = '';
bodyEl.appendChild(editor); bodyEl.appendChild(editor);
bodyEl.appendChild(btnRow); bodyEl.appendChild(btnRow);
userMsgElement.classList.add('editing');
editor.focus(); editor.focus();
cancelBtn.addEventListener('click', (e) => { cancelBtn.addEventListener('click', (e) => {
e.stopPropagation(); e.stopPropagation();
userMsgElement.classList.remove('editing');
bodyEl.innerHTML = originalHTML; bodyEl.innerHTML = originalHTML;
}); });
@ -4054,6 +4056,7 @@ import { wireArrowUpRecall, getLastUserMessageFromChatHistory } from './composer
} catch (err) { } catch (err) {
console.error('Edit failed:', err); console.error('Edit failed:', err);
if (uiModule) uiModule.showError('Edit failed: ' + err.message); if (uiModule) uiModule.showError('Edit failed: ' + err.message);
userMsgElement.classList.remove('editing');
bodyEl.innerHTML = originalHTML; bodyEl.innerHTML = originalHTML;
} }
}); });

View file

@ -3887,6 +3887,7 @@ body.bg-pattern-sparkles {
min-height:80px; min-height:80px;
} }
.edit-textarea:focus { border-color:var(--red); } .edit-textarea:focus { border-color:var(--red); }
.msg-user.editing { width: 85% !important; }
.edit-save-btn, .edit-cancel-btn { .edit-save-btn, .edit-cancel-btn {
background:var(--bg); color:var(--fg); background:var(--bg); color:var(--fg);
border:1px solid var(--border); border-radius:6px; border:1px solid var(--border); border-radius:6px;