You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The data-loop defenses in the mobiledoc-editor component (_localMobiledoc and _upstreamMobileDoc) aren't sufficient to guard against many possible data loops, so it's easy to lose cursor position.
We could use an explicit document key/id instead. In practice, there is usually a good key laying around, like:
The data-loop defenses in the mobiledoc-editor component (
_localMobiledoc
and_upstreamMobileDoc
) aren't sufficient to guard against many possible data loops, so it's easy to lose cursor position.We could use an explicit document key/id instead. In practice, there is usually a good key laying around, like:
The above example would only rebuild the editor if
key
changes. It would safely ignore any of its own changes that come back down.I implemented this pattern in a component that wraps mobiledoc-editor and it seems to work well.
The text was updated successfully, but these errors were encountered: