immich/web/src/lib/utils/shortcut.ts
martin a678590ccd
refactor(web): disable shortcut when writting (#4057)
* Revert "fix: disable shortcut when writting text (#4053)"

This reverts commit fd6ade2b5d6ff338619fdd4d044ba64ba9368b23.

* refactor: disable shortcut when writting

* pr feedback

* pr feedback
2023-09-12 21:26:53 +07:00

8 lines
206 B
TypeScript

export const shouldIgnoreShortcut = (event: Event): boolean => {
const type = (event.target as HTMLInputElement).type;
if (['textarea', 'text'].includes(type)) {
return true;
}
return false;
};