You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
changed the title [-]in windows not able to add tags using space , tab and enter[/-][+]in ubuntu 18.04 LTS not able to add tags using space , tab and enter[/+]on Feb 17, 2020
My assumption is that your browser does not support the KeyboardEvent.key property (ref1, ref2) but this was introduced in Chrome 51 which was released in 2016 🤔
i m using two browsers, chromium Version 80.0.3987.87 and chrome Version 80.0.3987.100 ,but when i install 5.11.2 version then its working fine but when i install the latest its not creating tags using enter ,tab or spacebar
I've not been able to recreate this @kishan143-jaiswal. I've tried with Ubuntu 18.04 and Chrome 80.0.3987.116 on a Virtualbox VM and tested on a developer edition Dell XPS machine and everything works as expected.
The keyboard event test indicates that your browser supports the KeyboardEvent.key property so I'm afraid I don't have any more ideas about what may be causing problems for you.
I'm using Linux Mint 19.3 which I am experiencing a similar problem - when the text field is selected, clicking on the suggestions, and hitting tab/enter do not autocomplete tags for me.
And also using Chrome Version 80.0.3987.122 (Official Build) (64-bit)
For those who knoweth not, Mint 19 is based on Ubuntu 18
Looks like in my case, keyDown is picking up Tab/Enter fine, however when it comes to autocompleting a highlighted tag or the top suggestion you have in this place: function pressDelimiter ()
a line like
var match = this.state.options.findIndex(function (option) {
return matchExact(this$1.state.query).test(option.name)
});
Now 'matchExact('b')' is looking for /^b$/i because it is a whole string match, not a partial. This is causing autocomplete by suggestions not to work!
function matchExact (string) {
return new RegExp(("^" + (escapeForRegExp(string)) + "$"), 'i')
}
I think I'd rather have matchPartial()
But its always returning -1 so the function short circuits for me. Since it isn't an exact match, but I have allowNew={false}, and I'd like it to pick the first valid suggestion.
@BirdTho regarding your second comment, the handleAddition callback is used by the current (v5) and earlier versions of the component and onAddition is used by the v6 version which is in beta. The v6 documentation is here.
Unfortunately I accidentally published a v6 beta version with the latest npm tag so you may have installed this unintentionally instead of v5 as expected. This mistake has been corrected.
Hey, I'm facing the same issue when I'm trying to use the default comma, enter to create new tags.
I'm using Ubuntu v18.04 on a Dell Latitude 3410..
Edit:
I looked into the code of the package that I downloaded of react-tag-autocomplete from npm and in that the bundle appears to be comparing KeyCode to string values. it seems outdated from the package in this repo
Activity
[-]in windows not able to add tags using space , tab and enter[/-][+]in ubuntu 18.04 LTS not able to add tags using space , tab and enter[/+]i-like-robots commentedon Feb 17, 2020
Hello @kishan143-jaiswal - what browser are you using?
kishan143-jaiswal commentedon Feb 18, 2020
chrome
i-like-robots commentedon Feb 18, 2020
And what version of Chrome are you using?
My assumption is that your browser does not support the
KeyboardEvent.key
property (ref1, ref2) but this was introduced in Chrome 51 which was released in 2016 🤔kishan143-jaiswal commentedon Feb 20, 2020
i m using two browsers, chromium Version 80.0.3987.87 and chrome Version 80.0.3987.100 ,but when i install 5.11.2 version then its working fine but when i install the latest its not creating tags using enter ,tab or spacebar
i-like-robots commentedon Feb 20, 2020
Thanks for that extra info. I'll install an Ubuntu VM and try to recreate this myself.
If you could, I'd really appreciate it you could visit https://dvcs.w3.org/hg/d4e/raw-file/tip/key-event-test.html then press the return, tab, and space keys and let me know the results.
kishan143-jaiswal commentedon Feb 20, 2020
i-like-robots commentedon Feb 20, 2020
That's really helpful, thank you
i-like-robots commentedon Feb 24, 2020
I've not been able to recreate this @kishan143-jaiswal. I've tried with Ubuntu 18.04 and Chrome 80.0.3987.116 on a Virtualbox VM and tested on a developer edition Dell XPS machine and everything works as expected.
The keyboard event test indicates that your browser supports the
KeyboardEvent.key
property so I'm afraid I don't have any more ideas about what may be causing problems for you.BirdTho commentedon Mar 4, 2020
I'm using Linux Mint 19.3 which I am experiencing a similar problem - when the text field is selected, clicking on the suggestions, and hitting tab/enter do not autocomplete tags for me.
And also using Chrome Version 80.0.3987.122 (Official Build) (64-bit)
For those who knoweth not, Mint 19 is based on Ubuntu 18
BirdTho commentedon Mar 4, 2020
Looks like in my case, keyDown is picking up Tab/Enter fine, however when it comes to autocompleting a highlighted tag or the top suggestion you have in this place:
function pressDelimiter ()
a line like
Now 'matchExact('b')' is looking for
/^b$/i
because it is a whole string match, not a partial. This is causing autocomplete by suggestions not to work!I think I'd rather have
matchPartial()
But its always returning -1 so the function short circuits for me. Since it isn't an exact match, but I have
allowNew={false}
, and I'd like it to pick the first valid suggestion.BirdTho commentedon Mar 4, 2020
Also while typing out a complete tag, tab does work, but it gets elsewhere in the code and blows up:
See there, where it says
this.props.onAddition(tag)
? You have it ashandleAddition
in your Readme.md file. So this is confusing documentation.i-like-robots commentedon Mar 4, 2020
@BirdTho regarding your second comment, the
handleAddition
callback is used by the current (v5) and earlier versions of the component andonAddition
is used by the v6 version which is in beta. The v6 documentation is here.Unfortunately I accidentally published a v6 beta version with the
latest
npm tag so you may have installed this unintentionally instead of v5 as expected. This mistake has been corrected.AstroProjection commentedon Jun 25, 2021
Hey, I'm facing the same issue when I'm trying to use the default comma, enter to create new tags.
I'm using Ubuntu v18.04 on a Dell Latitude 3410..
Edit:
I looked into the code of the package that I downloaded of react-tag-autocomplete from npm and in that the bundle appears to be comparing KeyCode to string values. it seems outdated from the package in this repo