Closed caffodian closed 7 years ago
Articulating some points better:
Doing one bookmark per batch is nice. However, restoring bookmarks is expensive regardless of whether it actually does something visible to the user (because span removal is required, or checks are required.)
Also, by creating the bookmark only once per batch, we create problems when you have multiple excessively large blocks. Because things are now more responsive, it's possible to do more things and get the selection restored to the wrong place.
We need to:
I might be going insane but it's possible that with all the various changes we made along the way, that bookmarking is no longer needed (except for span removal)
One ugly case we don't handle properly (which makes figuring out bookmarks difficult) - if a word is actually multiple text nodes and you type into the middle of it
The render event already takes a rootElement. Is it sufficient to determine if the selection falls inside?
I was talking through this problem and then realized this is horrible to do. This must be leftover cruft from the initial "touch the whole document" version.