Mark document dirty after keypress instead of waiting for onChange
event.