fix(messages): Enter sends message via DOM keydown, styled kbd hint below input
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4a3be6a060
commit
cdc8c36191
@ -967,10 +967,21 @@
|
||||
}
|
||||
|
||||
.input-hint {
|
||||
font-size: 11px;
|
||||
color: var(--conv-text-muted);
|
||||
font-size: 12px;
|
||||
color: var(--conv-text-secondary, #605e5c);
|
||||
text-align: right;
|
||||
padding: 4px 4px 0;
|
||||
padding: 6px 8px 2px;
|
||||
letter-spacing: 0.2px;
|
||||
}
|
||||
.input-hint kbd {
|
||||
display: inline-block;
|
||||
padding: 1px 5px;
|
||||
font-size: 11px;
|
||||
font-family: inherit;
|
||||
background: var(--conv-surface-secondary, #f3f2f1);
|
||||
border: 1px solid var(--conv-border, #e1dfdd);
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 1px 0 rgba(0,0,0,0.08);
|
||||
}
|
||||
|
||||
/* --- Quill editor inside input wrapper --- */
|
||||
|
||||
@ -1057,20 +1057,18 @@
|
||||
placeholder: 'Napisz wiadomość...',
|
||||
modules: {
|
||||
toolbar: [['bold', 'italic'], ['link'], ['clean']],
|
||||
keyboard: {
|
||||
bindings: {
|
||||
enter: {
|
||||
key: 13,
|
||||
handler: function () {
|
||||
Composer.send();
|
||||
return false;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
// Enter = send, Shift+Enter = newline (override via DOM keydown)
|
||||
state.quill.root.addEventListener('keydown', function (e) {
|
||||
if (e.key === 'Enter' && !e.shiftKey) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
Composer.send();
|
||||
}
|
||||
});
|
||||
|
||||
// Typing indicator
|
||||
state.quill.on('text-change', function () {
|
||||
Composer.sendTyping();
|
||||
|
||||
@ -139,7 +139,7 @@
|
||||
</div>
|
||||
<input type="file" id="fileInput" multiple style="display:none" accept=".jpg,.jpeg,.png,.gif,.pdf,.docx,.xlsx">
|
||||
<div class="attachments-preview" id="attachmentsPreview" style="display:none"></div>
|
||||
<div class="input-hint">Enter — wyślij · Shift+Enter — nowa linia</div>
|
||||
<div class="input-hint"><kbd>Enter</kbd> wyślij · <kbd>Shift</kbd>+<kbd>Enter</kbd> nowa linia</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user