Randall Leeds
Randall Leeds
See also: - https://github.com/orgs/pnpm/discussions/6676 - https://github.com/pnpm/pnpm/issues/6259
I'm taking a look to see what's going on here. In a quick debugging session I'm seeing that the paragraph does register _and unregister_ its ref (twice, actually, but that...
Oops, when I said `paragraph` I was failing to run _only_ this test. In this test, there is no paragraph. I am seeing the behavior where the update runs before...
We use a mount ref to give users control over the editing host element. The way `useEditorView` is written, we have layout effects that are meant to run and re-render...
With this change, the code you've added never gets called: ``` return DecorationSet.create(state.doc, [ Decoration.widget(1, () => { const div = document.createElement("div"); return div; - }), + }, { key:...
To summarize, I think this issue occurs when the decorations defined at the time that the editor mounts aren't keyed or otherwise memoized over state. If we want to account...
> I'm OK to close this PR and fix upstream By this do you mean in the application using react-prosemirror, or fixing something in prosemirror itself?
Happy to consider fixing things so that keyless widgets don't cause infinite loops at mount. I just don't think this PR is the fix I'd want to commit.
I think we have a better understanding of the cause of the extra update cycle and why we end up doing a ProseMirror update at a moment in the React...
Please have a look at #158 and close if you think that's a better way to go. After talking this through following our in person discussions today, I was able...