fix(budget): note — auto-focus/select seulement si vide #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Contexte
Onglet Budget → icône note (StickyNote2) →
ModalBottomSheetavecOutlinedTextField(BudgetScreen.kt:226-264).Actuel
noteTextinit viaremember(monthKey) { mutableStateOf(Store.monthNotes[monthKey] ?: "") }FocusRequester: le champ prend le focus aléatoirement selon le bottomSheet (clavier s’ouvre même si la note existe).Repro
Attendu (spec)
note.isEmpty()→FocusRequester.requestFocus()+SelectAll+ clavier auto.note.isNotEmpty()→ afficher en lecture, pas de focus auto ; tap dans leOutlinedTextField→ focus + édition.onDismissRequest/Enregistrer→Store.setMonthNote(monthKey, noteText)inchangé.Acceptance
FocusRequester+LaunchedEffect(note.isEmpty())dansshowMonthNoteTextFieldreadOnlyfaux mais focus seulement si vide au premier frameStore.monthNotes+persist()ok,monthKeyswitch conserve le comportement