tribute
tribute copied to clipboard
Stop searching once selection is made if `allowSpaces` is true. Seen in version 5.1.1 and higher.
It looks like this bug was introduced in version 5.1.1. I fiddled around with the version in my codepen link and everything works as expected in version 5.1.0 and then breaks in subsequent versions.
How can we reproduce this bug?
1. Set allowSpaces: true
in configuration
2. Attach tribute to a text area
3. Search for a value, e.g. type @Phil
4. Select user, e.g. Phil Heartman
, from list
5. Continue typing, e.g. "is not the famous voice actor"
6. Tribute continues searching in values
using text typed after the replaced selection text, i.e. searches values for "Phil Heartman is not the famous voice actor"
What did you expect to happen? Tribute stops trying to match typed input against values once a selection is made.
What happened instead? Tribute attempts to match typed string until another trigger character is typed.
Link (jsfiddle/plunkr/codepen) or Screenshot: Codepen: https://codepen.io/andmegan101/pen/qBqOYyN
I can reproduce, same problem
Can confirm - this blocks allowSpaces
from being used
Confirmed :(
+1
Same. Did anyone come up with a solution yet?
Same. Any timeline on resolution?
I did come up with a solution, but I had to change the whole tribute.js and introduce a new state that resolves after inserting a suggestion. Not elegant and not worth posting.
I did come up with a solution, but I had to change the whole tribute.js and introduce a new state that resolves after inserting a suggestion. Not elegant and not worth posting.
@MoritzGiessmann Nice...elegant or not, any port in a storm. Could you publish your version of the tribute.js? I have been tracing the code and trying to figure out best method to adjust /implement a solution but again, just logging at this point.
Doing comparison between versions 5.1.0 and 5.1.1 points to issue with line 1452 or essentially the "<li>No Match Found!</li>
" line. Resetting to "" works;
In version 5.1.3, if do search for "<li>No Match Found!</li>
" and replace with "" it works BUT
- still get "Loading" display
- obviously no "No Match Found!" will appear on search. Need to figure out case or scenario when allowSpaces is true for these. Will see what can figure out but if anyone quicker than I figures out, pass on.