From abe10a352c6c6ddeb1e04eca5d53e6730754e311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Miko=C5=82ajczak?= Date: Tue, 17 Sep 2024 19:30:54 +0200 Subject: [PATCH] pl-fe: fix fav hotkey --- packages/pl-fe/src/components/status.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/pl-fe/src/components/status.tsx b/packages/pl-fe/src/components/status.tsx index 6eb79e638..54155f94a 100644 --- a/packages/pl-fe/src/components/status.tsx +++ b/packages/pl-fe/src/components/status.tsx @@ -132,8 +132,9 @@ const Status: React.FC = (props) => { dispatch(replyCompose(actualStatus, status.reblog_id ? status.account : undefined)); }; - const handleHotkeyFavourite = (): void => { - toggleFavourite(actualStatus); + const handleHotkeyFavourite = (e?: KeyboardEvent): void => { + e?.preventDefault(); + dispatch(toggleFavourite(actualStatus)); }; const handleHotkeyBoost = (e?: KeyboardEvent): void => {