Spaces:
Sleeping
Sleeping
besst
Browse files
frontend/src/lib/components/VoiceButton.svelte
CHANGED
|
@@ -34,6 +34,11 @@
|
|
| 34 |
stopFn?.();
|
| 35 |
stopFn = null;
|
| 36 |
voiceStatus.set('processing');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
}
|
| 38 |
|
| 39 |
async function onKeyDown(e: KeyboardEvent) {
|
|
|
|
| 34 |
stopFn?.();
|
| 35 |
stopFn = null;
|
| 36 |
voiceStatus.set('processing');
|
| 37 |
+
// On mobile, prevent the browser from refocusing the last active input
|
| 38 |
+
// which would reopen the virtual keyboard
|
| 39 |
+
if (e instanceof TouchEvent) {
|
| 40 |
+
(document.activeElement as HTMLElement | null)?.blur();
|
| 41 |
+
}
|
| 42 |
}
|
| 43 |
|
| 44 |
async function onKeyDown(e: KeyboardEvent) {
|