How can I check what was the last deleted text to be reverted when performing an undo operation in a browser?

38 Views Asked by At

I am currently working on a text editor with the ability to add both plain text and cards, where cards can contain additional text. There is an issue related to the undo functionality (Ctrl+Z) provided by the browser.

When I delete a card that contains text and then perform an undo operation, the card is successfully restored, but the text inside the card sometimes fails to reappear. This behavior is inconsistent and poses a challenge for maintaining the editor's integrity.

Since the editor relies on the browser's built-in undo functionality, I am unsure about what is happening behind the scenes and why the original card content is not always restored along with the card itself.

Is there a way to gain visibility into the browser's undo process and understand why the text inside the card is occasionally omitted? Additionally, I would appreciate any suggestions or insights on how to address this issue and ensure consistent restoration of both the card and its associated text.

Thank you for your help and suggestions!

0

There are 0 best solutions below