microsoft / microsoft/roosterjs
We need to undo/redo twice to change the format sometimes
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.3k
- Forks
- 190
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 16
Description
Describe the bug
When modifying the format, under certain situations, we need to undo/redo twice to change the format.
To Reproduce
Steps to reproduce the behavior:
- Adjust the font size from a to b.
- Use undo to go back to a, then redo to return to b.
- Adjust the font size to c, undo once to return to b, and if you undo again, it will still be at b. You need to undo once more to go back to a.
- Redo works similarly; you need to redo twice from the b state.
Expected behavior
We don't need to undo/redo twice to change the format
Screenshots
https://github.com/user-attachments/assets/551ce7cf-442c-4eac-9f08-5341ee40b31e
Device Information
- OS: macOS
- Browser: safari
Additional context
It could be repro in font face, font size and text color, but it won't repro in heading styles, so I guess it maybe related to livePreview(shadow edit)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. Reproduce the sequence in Safari while changing font face, font size, and text color, then inspect the undo/redo handling around livePreview (shadow edit). Done means each undo and redo changes the format exactly once, while heading styles remain unaffected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100