fix: pressing shift +enter in task title field open the task desc

This commit is contained in:
Mo Tarbin
2026-07-14 14:22:34 -04:00
parent 66d3bc6c7b
commit 519b085dd2
2 changed files with 12 additions and 1 deletions

View File

@@ -836,6 +836,12 @@ const TaskInput = ({ onChoreUpdate, isModalOpen, onClose }) => {
}}
customRenderer={renderedParts}
onEnterPressed={handleEnterPressed}
onShiftEnterPressed={() => {
if (!hasDescription) {
setHasDescription(true)
}
setTimeout(() => richTextEditorRef.current?.focus(), 50)
}}
suggestions={{
'#': {
value: 'id',

View File

@@ -52,6 +52,7 @@ const SmartTaskTitleInput = ({
onChange,
suggestions,
onEnterPressed,
onShiftEnterPressed,
customRenderer,
isNativeScanner,
onScanClick,
@@ -158,7 +159,11 @@ const SmartTaskTitleInput = ({
} else {
if (e.key === 'Enter') {
e.preventDefault()
if (onEnterPressed) {
if (e.shiftKey) {
if (onShiftEnterPressed) {
onShiftEnterPressed(value)
}
} else if (onEnterPressed) {
onEnterPressed(value)
}
}