lexical icon indicating copy to clipboard operation
lexical copied to clipboard

Bug: the undo command behaves incorrectly, requiring two undo actions to revert a single change.

Open shoNagai opened this issue 1 year ago • 1 comments

When using Lexical on the iPhone, the undo command is not working correctly, requiring two undo operations to undo one change, also happens in Playground.

Lexical version: 0.17.0

Steps To Reproduce

  1. Go to Lexical Playground
  2. Type 'abcde'
  3. Tap undo once - 'abcde' disappears
  4. Tap undo again - 'abcde' reappears
  5. Tap undo once more - 'abcde' disappears
  6. Tap undo again - the input is fully cleared

Screenshots

https://github.com/user-attachments/assets/be5dfe6f-b72a-4ea4-b3bb-e10dbaf1bf29

Smartphone (please complete the following information):

  • Device: iPhone Xs
  • OS: iOS 17.5.1
  • Browser: Chrome

The current behavior

Two undo actions to revert a single change.

The expected behavior

A single undo action should revert one change.

Impact of fix

Fixing this issue is crucial for ensuring a consistent user experience across different devices.

shoNagai avatar Aug 05 '24 12:08 shoNagai

I suspect this issue is related to the IME behavior with the Japanese keyboard, it doesn't reproduce with the US keyboard. There have been similar reports of other IME related issues on iOS: #5841, #5629

etrepum avatar Aug 05 '24 15:08 etrepum