I noticed that selecting keyframes is considered a unique action that has its own entry in the undo history. Personally I prefer if it wasn't or if they were collapsed to the last action that actually modified a layer. Current experience: 1. Draw something on keyframe 1 2. Select keyframe 3 3. Select keyframe 2 4. Undo Actual: Goes back to 2, where keyframe 3 was selected Expect: Go back to step 1. That is, select keyframe 1 and undo the drawing action.
That sounds like a valid feature request. Though, if it's a quite big work to change it, it may not be a priority for now.
Just like switching layers shouldn't show up in the undo history, switching frames shouldn't end up in the undo history. This is an architecture/coding thing that is leaking into the user interface. However, it might be really difficult to fix.
For me, undoing switches frame to the previously selected frames, but it also undoes my recent strokes. Is that correct? So you can just undo what you want, then switch back to the needed frame as a work around. It works for me anyway. This is still a bug though.
This works for me in 4.0