diff --git a/apps/client/src/menus/custom-items/NoteColorPicker.tsx b/apps/client/src/menus/custom-items/NoteColorPicker.tsx index 06ae6dc96..9a65073a7 100644 --- a/apps/client/src/menus/custom-items/NoteColorPicker.tsx +++ b/apps/client/src/menus/custom-items/NoteColorPicker.tsx @@ -122,6 +122,7 @@ function CustomColorCell(props: ColorCellProps) { const colorInput = useRef(null); const colorInputDebouncer = useRef | null>(null); const callbackRef = useRef(props.onSelect); + const isSafari = useRef(/^((?!chrome|android).)*safari/i.test(navigator.userAgent)); useEffect(() => { colorInputDebouncer.current = new Debouncer(500, (color) => { @@ -152,7 +153,12 @@ function CustomColorCell(props: ColorCellProps) { colorInput.current?.click(); }, [pickedColor]); - return
+ return
{ + // The color picker dropdown will close on Safari if the parent context menu is + // dismissed, so stop the click propagation to prevent dismissing the menu. + isSafari.current && e.stopPropagation(); + }}>