Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

fix: notification card snooze (#3598)

Anmol Singh Bhatia4a145f7a06a8
diff --git a/packages/ui/src/dropdowns/custom-menu.tsx b/packages/ui/src/dropdowns/custom-menu.tsx
index 6dc49bc80b..a2b5ebe3db 100644
--- a/packages/ui/src/dropdowns/custom-menu.tsx
+++ b/packages/ui/src/dropdowns/custom-menu.tsx
@@ -105,7 +105,8 @@ const CustomMenu = (props: ICustomMenuDropdownProps) => {
<button
ref={setReferenceElement}
type="button"
- onClick={() => {
+ onClick={(e) => {
+ e.stopPropagation();
openDropdown();
if (menuButtonOnClick) menuButtonOnClick();
}}
@@ -121,7 +122,8 @@ const CustomMenu = (props: ICustomMenuDropdownProps) => {
<button
ref={setReferenceElement}
type="button"
- onClick={() => {
+ onClick={(e) => {
+ e.stopPropagation();
openDropdown();
if (menuButtonOnClick) menuButtonOnClick();
}}
@@ -145,7 +147,8 @@ const CustomMenu = (props: ICustomMenuDropdownProps) => {
? "cursor-not-allowed text-custom-text-200"
: "cursor-pointer hover:bg-custom-background-80"
} ${buttonClassName}`}
- onClick={() => {
+ onClick={(e) => {
+ e.stopPropagation();
openDropdown();
if (menuButtonOnClick) menuButtonOnClick();
}}
diff --git a/web/components/notifications/notification-card.tsx b/web/components/notifications/notification-card.tsx
index 58b79ac3eb..7a372c5d8d 100644
--- a/web/components/notifications/notification-card.tsx
+++ b/web/components/notifications/notification-card.tsx
@@ -208,9 +208,6 @@ export const NotificationCard: React.FC<NotificationCardProps> = (props) => {
<Tooltip tooltipContent="Snooze">
<CustomMenu
className="flex items-center"
- menuButtonOnClick={(e: { stopPropagation: () => void }) => {
- e.stopPropagation();
- }}
customButton={
<div className="flex w-full items-center gap-x-2 rounded bg-custom-background-80 p-0.5 text-sm hover:bg-custom-background-100">
<Clock className="h-3.5 w-3.5 text-custom-text-300" />