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

Pressing enter on not found causes a javascript error #16

Open
revolution42 opened this issue Sep 15, 2019 · 1 comment
Open

Pressing enter on not found causes a javascript error #16

revolution42 opened this issue Sep 15, 2019 · 1 comment

Comments

@revolution42
Copy link

  1. Go to https://react-component.github.io/mentions/?selectedKind=rc-mentions&selectedStory=dynamic&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Fsource%2Fpanel
  2. Type @dfadfdfadfdfadfdfdsfasd (or any string that won’t be found)
  3. Wait until it says Not Found
  4. Press enter

Initially it looks like https://github.com/react-component/mentions/blob/master/src/Mentions.tsx should check for a valid option
} else if (which === KeyCode.ENTER) { // Measure hit const option = this.getOptions()[activeIndex]; this.selectOption(option); event.preventDefault(); }

@nonotest
Copy link

hi guys - any update regarding this issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants