mirror of
https://github.com/immich-app/immich.git
synced 2025-11-24 17:30:43 +09:00
fix(web): Prevent DELETE key from clearing DateInput in modal (#8846)
* fix(web): Prevent DELETE key from clearing DateInput in modal (#8804) * chore: test prettier * fix: stop propagation * fix: stop propagation in modal * fix: remove unnecessary function and revise lint issue * chore: cleanup --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
@@ -20,7 +20,7 @@ export const shouldIgnoreShortcut = (event: KeyboardEvent): boolean => {
|
||||
return false;
|
||||
}
|
||||
const type = (event.target as HTMLInputElement).type;
|
||||
return ['textarea', 'text'].includes(type);
|
||||
return ['textarea', 'text', 'date', 'datetime-local'].includes(type);
|
||||
};
|
||||
|
||||
export const matchesShortcut = (event: KeyboardEvent, shortcut: Shortcut) => {
|
||||
|
||||
Reference in New Issue
Block a user