Core: Mention user (@)

Created on 19 Aug 2016  路  14Comments  路  Source: flarum/core

For me it is not working correctly - official flarum forum

  • press @ in editor and type for example "davis" - nobody is shown in a dropdown menu (user exists).

Some ideas:

  • add a user avatar next to the name in a dropdown menu
typbug

Most helpful comment

I did a frontend thing. :scream:

All 14 comments

Thanks for the report. I can't reproduce so can you please provide more specific instructions on how you're encountering this bug. e.g. which editor are you using (new discussion, reply?) which topic? does it happen after you reload the page? with other usernames? what about if you backspace a few times and then try again?

User avatar is already present next to the name in the dropdown menu.

Also, what browser and OS are you using? Cannot reproduce on desktop Firefox or Chrome.

I have experienced this. After some investigating (Devflarum - dev-master) Firefox 48
it appears it happens after several lines

Google Chrome last beta version (Win 10, 64 bit, Pro - anniversary update)

As @kulga - soemthing like this, but it happens only for some users

@Eldenroot user exists

Only users already loaded from the API are suggested by the dropdown. The list of users will be far from complete.

https://github.com/flarum/flarum-ext-mentions/blob/9da2ac1e122f6c2f9dce8c75dd407219cce9372c/js/forum/src/addComposerAutocomplete.js#L111

In order to see a user he must have an interaction in the visible portion of the discussion, be visible on the homepage if you went from here, or appeared on any other page visited before starting to write the mention.

This doesn't explain @kulga 's demo though :sweat_smile:

I reckon @kulga's find is to do with dodgy positioning of the list, related to the scroll position of the textarea

Missed that API call when reading the code :see_no_evil:

Yes, same issue happened to me with the emoji autocomplete when writing long messages. Not sure if that's reported as another issue.

IMO we should close this, until we have reproducible instructions for hitting the bug.

  1. Open post composer
  2. Press enter a few dozen times
  3. Type @ and see absence of dropdown (it is positioned off the screen)

Oh, the original issue description made it sound like the dropdown appears, but without correct matches for usernames. Is that a different issue then?

The original reported issue was not specific but is likely the same as what's happening in @kulga's comment. There's nothing to indicate that the username matching isn't working properly.

I suppose we calculate the positioning logic based on the position of the cursor within the textarea, while ignoring whether it has been scrolled down.

I did a frontend thing. :scream:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

datitisev picture datitisev  路  4Comments

franzliedke picture franzliedke  路  4Comments

MichaelBelgium picture MichaelBelgium  路  4Comments

jordanjay29 picture jordanjay29  路  3Comments

gingerbeardman picture gingerbeardman  路  4Comments