Skip to content

fix(ios): synced newline typing attributes with actual textStorage attributes - #775

Merged
hejsztynx merged 4 commits into
mainfrom
@ksienkiewicz/fix-ios-newline-typing-attributes
Aug 25, 2026
Merged

fix(ios): synced newline typing attributes with actual textStorage attributes#775
hejsztynx merged 4 commits into
mainfrom
@ksienkiewicz/fix-ios-newline-typing-attributes

Conversation

@hejsztynx

Copy link
Copy Markdown
Collaborator

Summary

Managing typing attributes was implemented in such way that when you moved the cursor to an empty line, the typing attributes got reset. This was to prevent picking up the style from the previous line, but it was done unconditionally. That caused the typingAttributes to be reset even though a style is already present in the newline and valid.

Test Plan

Experiment around, follow the test flow from the attached videos

Screenshots / Videos

Before:

Screen.Recording.2026-08-14.at.20.13.42.mov

After:

Screen.Recording.2026-08-14.at.20.18.55.mov

Compatibility

OS Implemented
iOS
Android
Web

Checklist

  • E2E tests are passing
  • Required E2E tests have been added (if applicable)

Copilot AI lite review requested due to automatic review settings August 14, 2026 18:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts iOS typing-attribute management so that moving the cursor onto an “empty line with newline” no longer unconditionally resets inline typing attributes when the newline already has valid inline styles applied.

Changes:

  • Introduces a helper to restore inline style typing attributes present at a given range.
  • When selection moves to an empty newline-only paragraph, restores inline styles present on that newline after resetting paragraph typing attributes.
  • Refactors existing “extend typing attributes from previous character” logic to reuse the new helper.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@hejsztynx
hejsztynx requested a review from szydlovsky August 14, 2026 18:48
Comment thread ios/inputAttributesManager/InputAttributesManager.mm
@hejsztynx
hejsztynx requested a review from szydlovsky August 21, 2026 17:36
@hejsztynx
hejsztynx merged commit 7fa3793 into main Aug 25, 2026
8 checks passed
@hejsztynx
hejsztynx deleted the @ksienkiewicz/fix-ios-newline-typing-attributes branch August 25, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants