Merge pull request 'feat: add keyboard shortcuts' (#649) from fernandoporazzi/snort:scroll-up-shortcut into main

Reviewed-on: #649
This commit is contained in:
2023-10-11 18:25:07 +00:00
3 changed files with 71 additions and 2 deletions

View File

@ -504,3 +504,11 @@ export function kvToObject<T>(o: string, sep?: string) {
export function defaultAvatar(input: string) {
return `https://robohash.v0l.io/${input}.png`;
}
export function isFormElement(target: HTMLElement): boolean {
if (target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement) {
return true;
}
return false;
}