diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-10-20 09:13:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-20 09:13:09 -0400 |
commit | 86aa9793101bb31a69f7ff491413c7af0f04a605 (patch) | |
tree | be14193af76c9df77f66c82ab5e366e4570766f0 /webapp/stores/suggestion_store.jsx | |
parent | 530b5f50119762486d5dfb363b31a3a491290bae (diff) | |
download | chat-86aa9793101bb31a69f7ff491413c7af0f04a605.tar.gz chat-86aa9793101bb31a69f7ff491413c7af0f04a605.tar.bz2 chat-86aa9793101bb31a69f7ff491413c7af0f04a605.zip |
Fix autocomplete not clearing suggestions properly (#4276)
Diffstat (limited to 'webapp/stores/suggestion_store.jsx')
-rw-r--r-- | webapp/stores/suggestion_store.jsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/webapp/stores/suggestion_store.jsx b/webapp/stores/suggestion_store.jsx index c528f7360..75221421f 100644 --- a/webapp/stores/suggestion_store.jsx +++ b/webapp/stores/suggestion_store.jsx @@ -222,7 +222,8 @@ class SuggestionStore extends EventEmitter { switch (type) { case ActionTypes.SUGGESTION_PRETEXT_CHANGED: - if (other.pretext === '') { + // Clear the suggestions if the pretext is empty or has whitespace + if (other.pretext === '' || (/\s/g.test(other.pretext))) { this.clearSuggestions(id); } |