babycode editor: change ctrl+enter shortcut to use requestSubmit to fire bitty signals
This commit is contained in:
@@ -114,6 +114,7 @@ export function babycodeEditorCharCount(evOrPayload, sender, el) {
|
||||
|
||||
export function clearThreadDraft(_, __, ___) {
|
||||
const threadId = getThreadId();
|
||||
if (threadId === -1) return;
|
||||
localStorage.removeItem(`thread-${threadId}`);
|
||||
}
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
ta.addEventListener('keydown', e => {
|
||||
if (e.ctrlKey && e.key === 'Enter') {
|
||||
if (ta.form.reportValidity()) {
|
||||
ta.form.submit();
|
||||
ta.form.requestSubmit();
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user