Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
文章中の絵文字などの補完で、タブが効かなくなってしまうケースがあるのを修正します。
具体的には以下の手順で再現できます。
:thumbs
などと書いて補完候補が出る (ここでタブを押すとそれが正しく選択される):thumbsaaa
などと補完候補が無くなるような文字を書くaaa
を消して:thumbs
に戻ると再び補完候補が表示される原因は
https://github.com/syuilo/misskey/blob/629b765abcab091c2a0d30ef5e881d28e2badf02/src/client/components/autocomplete.vue#L18
の行の
v-if
が false になるため、this.$refs.suggests
が示す要素が無くなり、その結果 computed であるitems
https://github.com/syuilo/misskey/blob/629b765abcab091c2a0d30ef5e881d28e2badf02/src/client/components/autocomplete.vue#L131-L134
が更新されなくなってしまうようです。