fix(messages): restore DOM keydown with capture:true — Quill binding didn't work
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
This commit is contained in:
parent
bc92605769
commit
86d9262c3e
@ -1203,23 +1203,17 @@
|
|||||||
placeholder: 'Napisz wiadomość...',
|
placeholder: 'Napisz wiadomość...',
|
||||||
modules: {
|
modules: {
|
||||||
toolbar: [['bold', 'italic'], ['link'], ['clean']],
|
toolbar: [['bold', 'italic'], ['link'], ['clean']],
|
||||||
keyboard: {
|
|
||||||
bindings: {
|
|
||||||
enter: {
|
|
||||||
key: 13,
|
|
||||||
handler: function() { Composer.send(); return false; }
|
|
||||||
},
|
|
||||||
shiftEnter: {
|
|
||||||
key: 13,
|
|
||||||
shiftKey: true,
|
|
||||||
handler: function() { return true; } // Allow newline
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// Enter handled by Quill keyboard binding above (no duplicate DOM listener)
|
// Enter = send (capture phase fires BEFORE Quill processes the key)
|
||||||
|
state.quill.root.addEventListener('keydown', function (e) {
|
||||||
|
if (e.key === 'Enter' && !e.shiftKey) {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopImmediatePropagation();
|
||||||
|
Composer.send();
|
||||||
|
}
|
||||||
|
}, true);
|
||||||
|
|
||||||
// Typing indicator
|
// Typing indicator
|
||||||
state.quill.on('text-change', function () {
|
state.quill.on('text-change', function () {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user