diff --git a/webapp/src/properties/baseTextEditor.tsx b/webapp/src/properties/baseTextEditor.tsx index 0502f8ddb..334878df6 100644 --- a/webapp/src/properties/baseTextEditor.tsx +++ b/webapp/src/properties/baseTextEditor.tsx @@ -18,10 +18,14 @@ const BaseTextEditor = (props: PropertyProps & {validator: () => boolean, spellC if (value !== (props.card.fields.properties[props.propertyTemplate?.id || ''] || '')) { mutator.changePropertyValue(props.board.id, props.card, props.propertyTemplate?.id || '', value) } - }, [props.card, props.propertyTemplate, value]) + }, [props.board.id, props.card, props.propertyTemplate?.id, value]) const saveTextPropertyRef = useRef<() => void>(saveTextProperty) - saveTextPropertyRef.current = saveTextProperty + if (props.readOnly) { + saveTextPropertyRef.current = () => null + } else { + saveTextPropertyRef.current = saveTextProperty + } const intl = useIntl() const emptyDisplayValue = props.showEmptyPlaceholder ? intl.formatMessage({id: 'PropertyValueElement.empty', defaultMessage: 'Empty'}) : ''