forked from open-webui/open-webui
refac: mobile device detection
This commit is contained in:
parent
180fd44a4d
commit
7a96893093
1 changed files with 7 additions and 1 deletions
|
@ -762,7 +762,13 @@
|
||||||
: $i18n.t('Send a Message')}
|
: $i18n.t('Send a Message')}
|
||||||
bind:value={prompt}
|
bind:value={prompt}
|
||||||
on:keypress={(e) => {
|
on:keypress={(e) => {
|
||||||
if (window.innerWidth > 1024) {
|
if (
|
||||||
|
!(
|
||||||
|
'ontouchstart' in window ||
|
||||||
|
navigator.maxTouchPoints > 0 ||
|
||||||
|
navigator.msMaxTouchPoints > 0
|
||||||
|
)
|
||||||
|
) {
|
||||||
if (e.keyCode == 13 && !e.shiftKey) {
|
if (e.keyCode == 13 && !e.shiftKey) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue