At.js icon indicating copy to clipboard operation
At.js copied to clipboard

A few problem with acceptSpaceBar options

Open luongm opened this issue 9 years ago • 4 comments
trafficstars

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:

  1. 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
  2. I start the second @mention: @jacob @walter
  3. the dropdown menu shows at the first @ because there is only ONE .atwho-query and its content is "@jacob @walter"
  4. selecting anything would replace both of them.

Summary - 2 problems:

  1. when acceptSpaceBar is true, matcher fails to match the trailing whitespace, which closes the menu when the user gets to the space.
  2. ...and when it can, it doesn't make another .atwho-query for the next @: "@jacob @walter"

luongm avatar Oct 16 '16 12:10 luongm

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!

luongm avatar Oct 16 '16 12:10 luongm

Hi @luongm where you able to fix this?

tomalex0 avatar Dec 24 '16 03:12 tomalex0

Facing the same problem. Noticed this only occurs in FireFox and IE, but not in Chrome. Anyone found a fix for this?

JulesAchiel avatar Nov 17 '17 16:11 JulesAchiel

Did anyone find a fix for this? I have face issue in IE and Firefox. acceptSpaceBar not working

sayedatif avatar Aug 29 '18 16:08 sayedatif