diff --git a/packages/form-js-viewer/src/render/components/form-fields/parts/SimpleSelect.js b/packages/form-js-viewer/src/render/components/form-fields/parts/SimpleSelect.js index 74b87e7f8..a23008f37 100644 --- a/packages/form-js-viewer/src/render/components/form-fields/parts/SimpleSelect.js +++ b/packages/form-js-viewer/src/render/components/form-fields/parts/SimpleSelect.js @@ -56,7 +56,13 @@ export function SimpleSelect(props) { }, [ disabled, isDropdownExpanded, loadState, readonly, value ]); const onMouseDown = useCallback((e) => { + const input = inputRef.current; + + if (disabled || !input) { + return; + } + setIsDropdownExpanded(!isDropdownExpanded); if (isDropdownExpanded) { @@ -66,7 +72,7 @@ export function SimpleSelect(props) { } e.preventDefault(); - }, [ isDropdownExpanded ]); + }, [ disabled, isDropdownExpanded ]); const initialFocusIndex = useMemo(() => value && findIndex(options, (o) => o.value === value) || 0, [ options, value ]);