fix: edit-message textarea now fills full message width
.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:
parent
c93c14ece9
commit
f0031eac11
2 changed files with 4 additions and 0 deletions
|
|
@ -4018,10 +4018,12 @@ import { wireArrowUpRecall, getLastUserMessageFromChatHistory } from './composer
|
|||
bodyEl.innerHTML = '';
|
||||
bodyEl.appendChild(editor);
|
||||
bodyEl.appendChild(btnRow);
|
||||
userMsgElement.classList.add('editing');
|
||||
editor.focus();
|
||||
|
||||
cancelBtn.addEventListener('click', (e) => {
|
||||
e.stopPropagation();
|
||||
userMsgElement.classList.remove('editing');
|
||||
bodyEl.innerHTML = originalHTML;
|
||||
});
|
||||
|
||||
|
|
@ -4054,6 +4056,7 @@ import { wireArrowUpRecall, getLastUserMessageFromChatHistory } from './composer
|
|||
} catch (err) {
|
||||
console.error('Edit failed:', err);
|
||||
if (uiModule) uiModule.showError('Edit failed: ' + err.message);
|
||||
userMsgElement.classList.remove('editing');
|
||||
bodyEl.innerHTML = originalHTML;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -3887,6 +3887,7 @@ body.bg-pattern-sparkles {
|
|||
min-height:80px;
|
||||
}
|
||||
.edit-textarea:focus { border-color:var(--red); }
|
||||
.msg-user.editing { width: 85% !important; }
|
||||
.edit-save-btn, .edit-cancel-btn {
|
||||
background:var(--bg); color:var(--fg);
|
||||
border:1px solid var(--border); border-radius:6px;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue