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) -[![All Contributors](https://img.shields.io/badge/all_contributors-20-orange.svg?style=flat-square)](#contributors) +[![All Contributors](https://img.shields.io/badge/all_contributors-21-orange.svg?style=flat-square)](#contributors) [![npm](https://img.shields.io/npm/dw/@webscopeio/react-textarea-autocomplete.svg?style=flat-square)](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") | +
Jakub BeneΕ‘
Jakub BeneΕ‘

πŸ’» πŸ“– 🎨 πŸ€”
Andrey Taktaev
Andrey Taktaev

πŸ’»
Marcin LichwaΕ‚a
Marcin LichwaΕ‚a

πŸ’» πŸ“–
Davidson Nascimento
Davidson Nascimento

πŸ’»
KajMagnus
KajMagnus

πŸ› πŸ’»
JÑn VorčÑk
JÑn VorčÑk

πŸ› πŸ’»
Mateusz BurzyΕ„ski
Mateusz BurzyΕ„ski

πŸ’» πŸ“¦
Deepak Pai
Deepak Pai

πŸ› πŸ’»
Aleck Landgraf
Aleck Landgraf

πŸ’»
Serguei Okladnikov
Serguei Okladnikov

πŸ› πŸ’»
Michal Zochowski
Michal Zochowski

πŸ› πŸ’»
Igor Sachivka
Igor Sachivka

πŸ› πŸ’»
Andrew Shini
Andrew Shini

πŸ› πŸ’»
Rikesh Ramlochund
Rikesh Ramlochund

πŸ› πŸ’»
Matthew Hamilton
Matthew Hamilton

πŸ›
Danila
Danila

πŸ› πŸ’»
Silvio Di Stefano
Silvio Di Stefano

πŸ’»
Jelte Fennema
Jelte Fennema

πŸ› πŸ’»
Andy Pearson
Andy Pearson

πŸ› πŸ’»
Martin Kinkelin
Martin Kinkelin

πŸ› πŸ’»
Christopher Tempel
Christopher Tempel

πŸ› πŸ’»
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;