mod
                                
                                 mod copied to clipboard
                                
                                    mod copied to clipboard
                            
                            
                            
                        Mentions autocomplete sometimes adds an additional letter at the end
Repro steps:
type "@d" select "@df". It inserts "@df f" instead of just "@df". This happens with other names too
Can't seem to reproduce. What browser are you using?
arc
weird I can't repro every time, but I can still repro. Repro'd in safari as well - probs not a browser thing
Consistent way of reproducing is to type @d - wait for the request to complete, then type f and click the result immediately
May require a patch to change the way that tiptap behaves. The range of text that is replaced is calculated and passed here https://github.com/ueberdosis/tiptap/blob/main/packages/suggestion/src/suggestion.ts#L102
Reporting on my findings after doing some more digging. I think it would be useful to find where the suggestions plugin's state is updated and if that is somehow accessible from the mentions extension configuration. If we can trigger a state update on key press or when the mentioned user is selected it should solve our problem.
wonder if we can repro on https://tiptap.dev/api/nodes/mention and if not (as I suspect), what the difference in the code is
The difference is that suggestion.items in our code is async and in the example it’s not
Struggling to reproduce this reliably. I think we can remove this as a requirement for releasing. I suspect it's this here: https://github.com/ueberdosis/tiptap/issues/2544
there's a workaround here: https://github.com/ueberdosis/tiptap/issues/2592
I don't think that this is related tbh.
You type @a, and the Suggestion utility will call onKeyDown, which in turn calls reactRenderer.ref?.onKeyDown(props), which crashes the application:
Our problem is with the Suggestion state not being updated in time. Renderer is working fine
Repro: https://www.loom.com/share/7ab5d51dcb3347e6ad9d12e8541fd6fc?sid=b79b84d8-ffd6-4a58-a422-62b49d426e7f
ok yeah you're probably right