"src/git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "346b0df81107915ca36c3be0d1cc67f262eb491a"
Commit 7a968930 authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

refac: mobile device detection

parent 180fd44a
......@@ -762,7 +762,13 @@
: $i18n.t('Send a Message')}
bind:value={prompt}
on:keypress={(e) => {
if (window.innerWidth > 1024) {
if (
!(
'ontouchstart' in window ||
navigator.maxTouchPoints > 0 ||
navigator.msMaxTouchPoints > 0
)
) {
if (e.keyCode == 13 && !e.shiftKey) {
e.preventDefault();
}
......
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