Styling and autosuggest fixes for #293

This commit is contained in:
kibigo!
2018-01-05 20:04:13 -08:00
parent 8bf9d9362a
commit ad10a80a99
10 changed files with 128 additions and 133 deletions

View File

@@ -32,7 +32,7 @@ const handlers = {
// When blurring the textarea, suggestions are hidden.
handleBlur () {
//this.setState({ suggestionsHidden: true });
this.setState({ suggestionsHidden: true });
},
// When the contents of the textarea change, we have to pull up new
@@ -57,7 +57,7 @@ const handlers = {
const right = value.slice(selectionStart).search(/[\s\u200B]/);
const token = function () {
switch (true) {
case left < 0 || /[@:]/.test(!value[left]):
case left < 0 || !/[@:]/.test(value[left]):
return null;
case right < 0:
return value.slice(left);