-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
bugSomething isn't workingSomething isn't workingfrontThis issue is related to the front-end of the app.This issue is related to the front-end of the app.
Description
Bug description
The current mobile device detection logic incorrectly identifies laptops with touch screen functionality as mobile devices, resulting in the mobile user interface being displayed. This impacts usability on laptops with touch screen.
Submitting messages via enter key doesn't work, etc.
Steps to reproduce
- Access the application on a laptop with a touch screen.
- Observe the user interface behavior.
- Submitting messages via enter key doesn't work.
Notes
I think root causes are in function isVirtualKeyboard()
in ChatInput.svelte
chat-ui/src/lib/components/chat/ChatInput.svelte
Lines 88 to 101 in d238bc9
function isVirtualKeyboard(): boolean { | |
if (!browser) return false; | |
// Check for touch capability | |
if (navigator.maxTouchPoints > 0) return true; | |
// Check for touch events | |
if ("ontouchstart" in window) return true; | |
// Fallback to user agent string check | |
const userAgent = navigator.userAgent.toLowerCase(); | |
return /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(userAgent); | |
} |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfrontThis issue is related to the front-end of the app.This issue is related to the front-end of the app.