diff --git a/.all-contributorsrc b/.all-contributorsrc
index 2d40ad6..80b8656 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -203,6 +203,16 @@
"bug",
"code"
]
+ },
+ {
+ "login": "Psyphant",
+ "name": "Christopher Tempel",
+ "avatar_url": "https://avatars0.githubusercontent.com/u/364954?v=4",
+ "profile": "https://github.com/Psyphant",
+ "contributions": [
+ "bug",
+ "code"
+ ]
}
],
"repoType": "github"
diff --git a/README.md b/README.md
index 3b7615c..a00c86c 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ Enhanced textarea to achieve autocomplete functionality.
[![MIT License][license-badge]][license]
[![PRs Welcome][prs-badge]](#Development)
-[](#contributors)
+[](#contributors)
[](https://www.npmjs.com/package/@webscopeio/react-textarea-autocomplete)
@@ -266,10 +266,7 @@ Also, I'd love to thank these wonderful people for their contribution ([emoji ke
-| [
Jakub BeneΕ‘](https://jukben.cz)
[π»](https://github.com/webscopeio/react-textarea-autocomplete/commits?author=jukben "Code") [π](https://github.com/webscopeio/react-textarea-autocomplete/commits?author=jukben "Documentation") [π¨](#design-jukben "Design") [π€](#ideas-jukben "Ideas, Planning, & Feedback") | [
Andrey Taktaev](https://github.com/JokerNN)
[π»](https://github.com/webscopeio/react-textarea-autocomplete/commits?author=JokerNN "Code") | [
Marcin LichwaΕa](https://github.com/marcinlichwala)
[π»](https://github.com/webscopeio/react-textarea-autocomplete/commits?author=marcinlichwala "Code") [π](https://github.com/webscopeio/react-textarea-autocomplete/commits?author=marcinlichwala "Documentation") | [
Davidson Nascimento](https://github.com/davidsonsns)
[π»](https://github.com/webscopeio/react-textarea-autocomplete/commits?author=davidsonsns "Code") | [
KajMagnus](http://www.effectivediscussions.org/)
[π](https://github.com/webscopeio/react-textarea-autocomplete/issues?q=author%3Akajmagnus "Bug reports") [π»](https://github.com/webscopeio/react-textarea-autocomplete/commits?author=kajmagnus "Code") | [
JΓ‘n VorΔΓ‘k](https://twitter.com/janvorcak)
[π](https://github.com/webscopeio/react-textarea-autocomplete/issues?q=author%3Ajvorcak "Bug reports") [π»](https://github.com/webscopeio/react-textarea-autocomplete/commits?author=jvorcak "Code") | [
Mateusz BurzyΕski](https://github.com/Andarist)
[π»](https://github.com/webscopeio/react-textarea-autocomplete/commits?author=Andarist "Code") [π¦](#platform-Andarist "Packaging/porting to new platform") |
-| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
-| [
Deepak Pai](https://github.com/debugpai2)
[π](https://github.com/webscopeio/react-textarea-autocomplete/issues?q=author%3Adebugpai2 "Bug reports") [π»](https://github.com/webscopeio/react-textarea-autocomplete/commits?author=debugpai2 "Code") | [
Aleck Landgraf](http://aleck.me)
[π»](https://github.com/webscopeio/react-textarea-autocomplete/commits?author=alecklandgraf "Code") | [
Serguei Okladnikov](https://github.com/oklas)
[π](https://github.com/webscopeio/react-textarea-autocomplete/issues?q=author%3Aoklas "Bug reports") [π»](https://github.com/webscopeio/react-textarea-autocomplete/commits?author=oklas "Code") | [
Michal Zochowski](https://github.com/michauzo)
[π](https://github.com/webscopeio/react-textarea-autocomplete/issues?q=author%3Amichauzo "Bug reports") [π»](https://github.com/webscopeio/react-textarea-autocomplete/commits?author=michauzo "Code") | [
Igor Sachivka](https://github.com/isachivka)
[π](https://github.com/webscopeio/react-textarea-autocomplete/issues?q=author%3Aisachivka "Bug reports") [π»](https://github.com/webscopeio/react-textarea-autocomplete/commits?author=isachivka "Code") | [
Andrew Shini](https://github.com/superandrew213)
[π](https://github.com/webscopeio/react-textarea-autocomplete/issues?q=author%3Asuperandrew213 "Bug reports") [π»](https://github.com/webscopeio/react-textarea-autocomplete/commits?author=superandrew213 "Code") | [
Rikesh Ramlochund](https://paperboat.io)
[π](https://github.com/webscopeio/react-textarea-autocomplete/issues?q=author%3Arrikesh "Bug reports") [π»](https://github.com/webscopeio/react-textarea-autocomplete/commits?author=rrikesh "Code") |
-| [
Matthew Hamilton](https://github.com/diogeneshamilton)
[π](https://github.com/webscopeio/react-textarea-autocomplete/issues?q=author%3Adiogeneshamilton "Bug reports") | [
Danila](https://github.com/O4epegb)
[π](https://github.com/webscopeio/react-textarea-autocomplete/issues?q=author%3AO4epegb "Bug reports") [π»](https://github.com/webscopeio/react-textarea-autocomplete/commits?author=O4epegb "Code") | [
Silvio Di Stefano](http://sites.google.com/site/sdistefano/)
[π»](https://github.com/webscopeio/react-textarea-autocomplete/commits?author=sdistefano "Code") | [
Jelte Fennema](https://github.com/JelteF)
[π](https://github.com/webscopeio/react-textarea-autocomplete/issues?q=author%3AJelteF "Bug reports") [π»](https://github.com/webscopeio/react-textarea-autocomplete/commits?author=JelteF "Code") | [
Andy Pearson](http://andypearson.co)
[π](https://github.com/webscopeio/react-textarea-autocomplete/issues?q=author%3Aandypearson "Bug reports") [π»](https://github.com/webscopeio/react-textarea-autocomplete/commits?author=andypearson "Code") | [
Martin Kinkelin](https://github.com/kinke)
[π](https://github.com/webscopeio/react-textarea-autocomplete/issues?q=author%3Akinke "Bug reports") [π»](https://github.com/webscopeio/react-textarea-autocomplete/commits?author=kinke "Code") |
+
diff --git a/src/Textarea.jsx b/src/Textarea.jsx
index 511f787..9d38b07 100644
--- a/src/Textarea.jsx
+++ b/src/Textarea.jsx
@@ -761,8 +761,8 @@ class ReactTextareaAutocomplete extends React.Component<
if (
currentTrigger &&
trigger[currentTrigger].afterWhitespace &&
- (value[selectionEnd - lastToken.length - 1] !== " " &&
- value[selectionEnd - lastToken.length - 1] !== undefined)
+ !/\s/.test(value[selectionEnd - lastToken.length - 1]) &&
+ value[selectionEnd - lastToken.length - 1] !== undefined
) {
this._closeAutocomplete();
return;