Hi - I could not find a discussion about this topic. Apologies if it’s touching a discussed topic.
We recently found a bug in Lexical which was caused by accessing the event.delta
asynchronously in a separate event call. We managed to fix this by accessing delta in the initial event call so it’s computed sooner safely. (Thank you for the documentation in code)
I understand that computing delta on-demand avoids unnecessary computation if delta is not to be used. But at the same time I’m guessing many editors are designed to use and apply the event.delta
asynchronously, and they may overlook the fact that delta should be accessed and stored in the initial event call. I was wondering if there’s a way to avoid this by redesigning the transaction model so deltas can be computed safely asynchronously.
Thank you