lexical
lexical copied to clipboard
Bug: the undo command behaves incorrectly, requiring two undo actions to revert a single change.
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
- Go to Lexical Playground
- Type 'abcde'
- Tap undo once - 'abcde' disappears
- Tap undo again - 'abcde' reappears
- Tap undo once more - 'abcde' disappears
- 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.
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