Mobile haptic feedback

This commit is contained in:
space-nuko
2023-05-07 16:56:16 -05:00
parent 6dd2627f2c
commit 8ec2301093
9 changed files with 112 additions and 25 deletions

View File

@@ -55,9 +55,14 @@
return links[0].data
}
function onFocus() {
navigator.vibrate(20)
}
function onSelect() {
if (input)
input.blur();
navigator.vibrate(20)
}
let lastPropsChanged: number = 0;
@@ -86,6 +91,7 @@
inputAttributes={{ autocomplete: 'off' }}
bind:input
on:change
on:focus={onFocus}
on:select={onSelect}
on:filter
on:blur