-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion menu appears when clicking on potential mention #2680
Comments
I had some time to look into this today (separate to the maintainers) and have some comments to add. Firstly, you've actually mentioned two bugs, the second one being that: "suggestions should not be triggered when Back to the main issue you've raised here, the root cause appears to be an underlying design decision of how the suggestions plugin works. My understanding of how it works, is that (when you have an empty selection) it looks backwards in the current text block to see if the text that precedes your cursor matches the rough semantics of I'll let the maintainers weigh in here on how they see suggestions evolving, since any change to this behaviour will likely have flow on impacts to other parts of the UX here. e.g. this would cease to work TiptapMentionBehaviour.mov |
@scottsidwell Thank you for the reply and the fix! It's very much appreciated. Huh, interesting. Thanks for looking into it and that makes sense. I'll see if the maintainers will weigh in. Getting it to not show up when not editable is already a big UX improvement. |
@scottsidwell Thanks for disaggregating the two issues so succinctly and for fixing the read-only editor behavior! I'm also interested in hearing about how to let people "opt out" of choosing something from the suggestion menu. Following! |
@jessicalc @grantmagdanz do you think this behaviour should be optional? As already discussed, the current solution is to check the current Textblock for a specific pattern in front of the current curserPos. I don't have an exact idea yet where to "store" that a user saw a suggestion menu and decided not to use it. Happily taking suggestions before working on it. 🤞 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 7 days |
What’s the bug you are facing?
Clicking an incomplete mention causes the suggestion menu to appear.
How can we reproduce the bug on our side?
@win
and thenesc
. Do not complete the extention.@win
(may need to click twice)Headless.WYSIWYG.Text.Editor.Tiptap.Editor.-.4.April.2022.mp4
Can you provide a CodeSandbox?
No response
What did you expect to happen?
After a user indicates they do not want to mention (e.g. they hit
esc
) the mention should act as plain text.Anything to add? (optional)
This is particularly confusing because it happens when the editor is not in
editable
mode.Did you update your dependencies?
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: