1
0
Fork 1
mirror of https://example.com synced 2024-11-24 05:56:39 +09:00

Disable enter for touchscreens

This commit is contained in:
ThatOneCalculator 2022-07-06 18:35:45 -07:00
parent 033462653c
commit e37dd8b93e

View file

@ -128,7 +128,7 @@ function onKeydown(ev: KeyboardEvent) {
if ((ev.key === 'Enter') && (ev.ctrlKey || ev.metaKey)) {
textEl.value += '\n';
}
else if (ev.key === 'Enter' && !ev.shiftKey && canSend) {
else if (ev.key === 'Enter' && !ev.shiftKey && !('ontouchstart' in document.documentElement) && canSend) {
send();
}
}