mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-04 03:25:14 +00:00
Fix hashtag completion not being inserted correctly (#36884)
This commit is contained in:
parent
1d081250f4
commit
5a57c0844a
1 changed files with 2 additions and 2 deletions
|
|
@ -673,8 +673,8 @@ export function selectComposeSuggestion(position, token, suggestion, path) {
|
|||
|
||||
dispatch(useEmoji(suggestion));
|
||||
} else if (suggestion.type === 'hashtag') {
|
||||
completion = suggestion.name.slice(token.length - 1);
|
||||
startPosition = position + token.length;
|
||||
completion = token + suggestion.name.slice(token.length - 1);
|
||||
startPosition = position - 1;
|
||||
} else if (suggestion.type === 'account') {
|
||||
completion = `@${getState().getIn(['accounts', suggestion.id, 'acct'])}`;
|
||||
startPosition = position - 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue