Skip to content
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

useSuggest returns invalid position (pr706) #873

Closed
ronnyroeller opened this issue Feb 23, 2021 · 1 comment · Fixed by #880
Closed

useSuggest returns invalid position (pr706) #873

ronnyroeller opened this issue Feb 23, 2021 · 1 comment · Fixed by #880
Assignees
Labels
framework: react ⚛️ Any changes to packages which are exclusively used for react code bases. status: confirmed 🟢 The bug has been tested and confirmed. status: sponsored 💖 All issues and pull requests which have been requested from or created by sponsors. type: bug 🪲 Something isn't working

Comments

@ronnyroeller
Copy link
Collaborator

ronnyroeller commented Feb 23, 2021

Summary

I use a suggestor within the editor (0.0.0-pr706.5). When removing the character that triggers the suggestor, the view is already updated with the new content (i.e. the triggering character is gone) but useSuggest still returns the - now invalid position. This triggers the below error:

image

Steps to reproduce

[Note: I used pr706.4 in codesandbox because it currently doesn't handle pr706.5 (details). I locally reproduced the issue also with pr706.5]

  1. Open sandbox: https://codesandbox.io/s/remirror-pr-test-forked-nwx9n?file=/src/App.tsx
  2. Enter slash sign (/)
  3. Delete slash delete
Screen.Recording.2021-02-23.at.2.32.12.PM.mov

Expected results

useSuggest doesn't return a match after the character was removed.

@ronnyroeller ronnyroeller added the type: bug 🪲 Something isn't working label Feb 23, 2021
@github-actions github-actions bot added the status: sponsored 💖 All issues and pull requests which have been requested from or created by sponsors. label Feb 23, 2021
@ifiokjr
Copy link
Member

ifiokjr commented Feb 23, 2021

This is strange, I'll investigate and see what's causing the issue.

@ifiokjr ifiokjr added status: confirmed 🟢 The bug has been tested and confirmed. framework: react ⚛️ Any changes to packages which are exclusively used for react code bases. labels Feb 25, 2021
@ifiokjr ifiokjr added this to To do in remirror@1.0.0 via automation Feb 25, 2021
@ifiokjr ifiokjr added this to Needs triage in Bugs via automation Feb 25, 2021
@ifiokjr ifiokjr moved this from To do to In progress in remirror@1.0.0 Feb 25, 2021
@ifiokjr ifiokjr moved this from Needs triage to High priority in Bugs Feb 25, 2021
@ifiokjr ifiokjr self-assigned this Feb 25, 2021
ifiokjr added a commit that referenced this issue Feb 26, 2021
remirror@1.0.0 automation moved this from In progress to Done Feb 26, 2021
Bugs automation moved this from High priority to Closed Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
framework: react ⚛️ Any changes to packages which are exclusively used for react code bases. status: confirmed 🟢 The bug has been tested and confirmed. status: sponsored 💖 All issues and pull requests which have been requested from or created by sponsors. type: bug 🪲 Something isn't working
Projects
Bugs
  
Closed
Development

Successfully merging a pull request may close this issue.

2 participants