At.js
At.js copied to clipboard
A few problem with acceptSpaceBar options
When acceptSpaceBar is true, typing @jacob will show the menu. Add a space after that, @jacob would close the menu, and adding another character, @jacob w would show the menu again. This is because of the matcher callback not matching the trailing white space, which is instead of a regular .
However, once I change the matcher callback to accomodate that, the following problem occurs:
- I start the first @mention without completing it (either not selecting anything by hitting ESC or just no results found). string so far is
@jacob - I start the second @mention:
@jacob @walter - the dropdown menu shows at the first @ because there is only ONE
.atwho-queryand its content is "@jacob @walter" - selecting anything would replace both of them.
Summary - 2 problems:
- when
acceptSpaceBaristrue,matcherfails to match the trailing whitespace, which closes the menu when the user gets to the space. - ...and when it can, it doesn't make another
.atwho-queryfor the next @: "@jacob @walter"
Here's a JSFiddle demonstrating these problems: https://jsfiddle.net/456g65b0/
Also worth noting that I'm using atwho with Froala, but I'm fairly certain that this is a bug on atwho side.
Anyways, awesome job btw!
Hi @luongm where you able to fix this?
Facing the same problem. Noticed this only occurs in FireFox and IE, but not in Chrome. Anyone found a fix for this?
Did anyone find a fix for this? I have face issue in IE and Firefox. acceptSpaceBar not working