Auto-scroll not working when inserting text programmatically without keyboard focus
Auto-scroll feature does not work when text is inserted programmatically (e.g., via speech-to-text) while the keyboard is hidden. The cursor/newly inserted text goes out of view and the editor doesn't scroll to keep it visible.
Expected Behavior
When text is inserted using controller.replaceText() with a selection parameter, the editor should automatically scroll to keep the cursor visible, similar to how it works when user is typing with keyboard.
Current Behavior
Text is inserted correctly at the cursor position The selection is updated to the new position BUT: The editor does not scroll to show the new cursor position This causes the cursor to disappear below the visible viewport
Environment
Flutter version: [3.35.5] Fleather version: directly to master branch Platform: iOS and Android
Steps to Reproduce
Steps to Reproduce
- Create a FleatherEditor with scrollable: true
- Add enough content so the editor becomes scrollable
- Hide the keyboard
- Programmatically insert text
- Observe that the text is inserted but the editor doesn't scroll to show it
Use Case This is critical for implementing speech-to-text functionality where:
User activates speech recognition via a bottom sheet Keyboard must be hidden to show the speech UI Text is continuously inserted as user speaks Editor should auto-scroll to keep the cursor visible above the bottom sheet
Could you provide a minimal sample code to reproduce the issue? @anneinge95
Closing as stale. Feel free to re-opon