[stable20] Fix autocompletion for usernames in comments #28248
Merged
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.
Issue: Autocompletion of usernames in comments (e.g. for a file) does not work on Nextcloud 20
1
$('#commentsTabView').find('.newCommentForm .message')is empty on page load. It looks (to me with my very basic understanding of this app) that html for the comments tab is injected when the tab gets active. But _initAutoComplete happens much earlier and#commentsTabViewdoes not exist.2
server/apps/comments/src/commentstabview.js
Lines 191 to 215 in f1d96ed
_.delay(function() {this inside the closure is null. usingsorbind(this)seems to fix it.3
When editing a comment sometimes a error like happens. More often when you add another mention.
server/apps/comments/src/commentstabview.js
Lines 668 to 670 in f1d96ed
Add, edit, delete comments still work afterwards. I'm not sure how to fix. Does anyone know what the above code is supposed to do? 🤷♂️
4
It's not possible to mention more than one person in one comment like
Hi @Amy @BenderbutHi @Amy, Hi @Benderdoes work. It's a bit weird from a user point. Hopefully good enough for now ;)