From 3d8d941d89c436a354865e18766da39ebefd66e5 Mon Sep 17 00:00:00 2001 From: Francis Dinh Date: Wed, 11 Apr 2018 04:23:13 -0400 Subject: [PATCH] Make autocomplete case insensitive --- src/components/post_status_form/post_status_form.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 999aa732..c8a6802a 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -53,7 +53,8 @@ const PostStatusForm = { candidates () { const firstchar = this.textAtCaret.charAt(0) if (firstchar === '@') { - const matchedUsers = filter(this.users, (user) => (String(user.name + user.screen_name)).match(this.textAtCaret.slice(1))) + const matchedUsers = filter(this.users, (user) => (String(user.name + user.screen_name)).toUpperCase() + .match(this.textAtCaret.slice(1).toUpperCase())) if (matchedUsers.length <= 0) { return false }