"...composable_kernel.git" did not exist on "97e6d514f7b21c4031fa4106148e2c17e103fd9a"
Commit f1d23408 authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

enhancement: disable submit via enter on mobile

parent e71ef421
...@@ -689,12 +689,13 @@ ...@@ -689,12 +689,13 @@
: $i18n.t('Send a Message')} : $i18n.t('Send a Message')}
bind:value={prompt} bind:value={prompt}
on:keypress={(e) => { on:keypress={(e) => {
if (e.keyCode == 13 && !e.shiftKey) { if (window.innerWidth > 1024) {
e.preventDefault(); if (e.keyCode == 13 && !e.shiftKey) {
} e.preventDefault();
if (prompt !== '' && e.keyCode == 13 && !e.shiftKey) { }
// TODO: Only if screensize > xl if (prompt !== '' && e.keyCode == 13 && !e.shiftKey) {
submitPrompt(prompt, user); submitPrompt(prompt, user);
}
} }
}} }}
on:keydown={async (e) => { on:keydown={async (e) => {
......
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