This page demonstrates the effect of changing the DOM on Internet Explorer's undo buffer. This error does not seem to be well documented, the only mention I could find of the issue was documented as part of Fraser Cain's htmlArea control.

You need to view this page with Internet Explorer (6 - 8) to observe the error.

A is a standard textarea control. This control demonstrates how the undo buffer normally behaves.

B has a keypress listener that adds, then removes, an element from the DOM. This demonstrates IE's undo buffer resetting.

C also has a keypress listener, but in this case the listener only changes the colour of the text in the element. This demonstrates that only certain operations reset the undo buffer.

With each of the textareas above try entering some text then invoking undo. A and C should behave identically, B should behave in a non-standard way.