"vscode:/vscode.git/clone" did not exist on "7d159ca723b1601c69532f5eb95c9e0c33f189f3"
Commit f1d23408 authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

enhancement: disable submit via enter on mobile

parent e71ef421
......@@ -689,13 +689,14 @@
: $i18n.t('Send a Message')}
bind:value={prompt}
on:keypress={(e) => {
if (window.innerWidth > 1024) {
if (e.keyCode == 13 && !e.shiftKey) {
e.preventDefault();
}
if (prompt !== '' && e.keyCode == 13 && !e.shiftKey) {
// TODO: Only if screensize > xl
submitPrompt(prompt, user);
}
}
}}
on:keydown={async (e) => {
const isCtrlPressed = e.ctrlKey || e.metaKey; // metaKey is for Cmd key on Mac
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment