Repository navigation
fix (iOS, Android, Web): Exit lists on empty item enter - #859
Open
szydlovsky wants to merge 5 commits into
Open
szydlovsky wants to merge 5 commits into
szydlovsky wants to merge 5 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Pressing Enter at the start of a populated Android list item incorrectly removes its list formatting instead of splitting it; the exit path needs an empty-new-paragraph check and a regression test.
1 open issue
What changed in this PR
This PR addresses #810 by making Enter on an empty list item exit the list in EnrichedTextInput across iOS, Android, and Web.
Changes:
- Adds native handling for exiting empty ordered, unordered, and checkbox list items.
- Updates Web keyboard handling to lift empty items out of lists.
- Adjusts browser tests and the native scrolling flow for the new behavior.
| File | Description |
|---|---|
src/web/formats/listKeyboard.ts |
Lifts empty list items while preserving alignment. |
ios/utils/ParagraphAttributesUtils.mm |
Implements empty-item newline handling. |
ios/utils/ParagraphAttributesUtils.h |
Declares the new newline handler. |
ios/EnrichedTextInputView.mm |
Runs the handler before checkbox newline handling. |
android/src/main/java/com/swmansion/enriched/textinput/styles/ListStyles.kt |
Adds empty-item list exit handling. |
.playwright/tests/listKeyboard.spec.ts |
Updates list-exit and scrolling scenarios. |
.maestro/enrichedInput/flows/scrolling_with_paragraph_styles.yaml |
Removes an extra Enter from the scrolling flow. |
Review effort: Balanced
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
This PR fixes issue #810, initially reported on only iOS but happens on all platforms.
Entering an empty list item just kept adding more points instead of terminating the style.
Now it finishes the list, which is a pretty uniform behaviour across many text editors.
Works for all 3 list types (ordered, unordered, checked) on all 3 platforms.
Test Plan
Launch any app, create a list and try entering an empty item.
Screenshots / Videos
After:
iOS:
Screen.Recording.2026-11-09.at.12.21.43.mov
Android:
Screen.Recording.2026-11-09.at.12.25.01.mov
Web:
Screen.Recording.2026-11-09.at.12.05.22.mov
Compatibility
Checklist