mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-02-15 07:28:59 +00:00
Close toast when action is clicked
This commit is contained in:
@@ -91,12 +91,14 @@ export const Toast = memo(
|
||||
ev.stopPropagation();
|
||||
ev.preventDefault();
|
||||
toastAction.onClick();
|
||||
onClose();
|
||||
}}
|
||||
onKeyDown={(ev: KeyboardEvent<HTMLDivElement>) => {
|
||||
if (ev.key === 'Enter' || ev.key === ' ') {
|
||||
ev.stopPropagation();
|
||||
ev.preventDefault();
|
||||
toastAction.onClick();
|
||||
onClose();
|
||||
}
|
||||
}}
|
||||
ref={focusRef}
|
||||
|
||||
Reference in New Issue
Block a user