Skip to content

Bug: Text format lost after auto-correcting on iOS #4801

@samirant15

Description

@samirant15

On an IOS device, if the user typed a misspelled word with formats like Bold or Italic, after clicking the autocorrected work on the native keyboard, it replaces the word with the correct one but the formats are lost.

Example from lexical playground website and an IOS simulator (note: it also happens on physical devices)
autocorrect-lexical

Lexical version: 0.11.2

Steps To Reproduce

  1. On a lexical editor type a word with formatting applied
  2. Make sure it is a misspelled word so the native keyboard prompts you to correct it
  3. Tap on the native keyboard suggestion and the word will be corrected but the formats are lost

Link to code example: It happens in the playground https://github.com/facebook/lexical/tree/main/packages/lexical-playground (see above screen record)

The current behavior

After autocorrecting a word on IOS the text formats are lost

The expected behavior

After autocorrecting a word on IOS the text formats should be kept

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions