diff --git a/packages/react/src/components/ComboBox/ComboBox.tsx b/packages/react/src/components/ComboBox/ComboBox.tsx index 557c9dbc7ef4..4f5919c71dcb 100644 --- a/packages/react/src/components/ComboBox/ComboBox.tsx +++ b/packages/react/src/components/ComboBox/ComboBox.tsx @@ -586,6 +586,12 @@ const ComboBox = forwardRef( if (onToggleClick) { onToggleClick(event); } + if (readOnly) { + // Prevent the list from opening if readOnly is true + event.preventDownshiftDefault = true; + event?.persist?.(); + return; + } if (event.target === textInput.current && isOpen) { event.preventDownshiftDefault = true; @@ -749,6 +755,12 @@ const ComboBox = forwardRef( evt.preventDefault(); } }, + onClick: (evt: MouseEvent) => { + // Prevent the default behavior which would open the list + evt.preventDefault(); + // Focus on the element as per readonly input behavior + evt.currentTarget.focus(); + }, } : {};