-
Notifications
You must be signed in to change notification settings - Fork 430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pasted text separated with new line symbol doesn't process correct #267
Comments
Thanks for reporting, I'll fix it asap |
Updated Tagify version to fix this You should write your Regex as so: {
delimiters : ",| |:|[\\n\\r]"
} |
Hello @yairEO, we have exactly the same problem with This input does not work:
This one works just fine:
The settings can be just to reproduce:
|
@keksa - I will check and let you know |
Related - #160 (comment) @keksa - try this |
Hi @yairEO, I tried and it does not help at all. First, I now understand this issue #268. The problem is, that with the delimiters now being a regexp (instead of list of characters), the Second, even if I change the code to use |
@keksa - ok, I see there is a bug with the CSS of the input element itself (within Tagify) and will issue a fix asap (hopefully today I will be releasing a major version) For now, keep your delimiters setting:
|
Hello @yairEO, I tried grabbing the code from the Works properly with commas, copy & paste of
Does not work without commas, copy & paste of:
The configuration is reduced to just this for testing: var tagify = new Tagify(
document.querySelector('.js-inventory-mac-addresses'),
{
delimiters: ",|[\\n\\r]",
}
); |
- do not add multiple after the last tag, in mixed-mode (happens if initial input value has multiline) - re-wrote "replaceTextWithNode" method completely and renamed it "replaceTextWithNode" - fix bug where unintended mixed-mode prefixes are removed instead of only the one needed - fix bug with mixed-mode dropdown not removed when Tagify de-focus - Changes to "autoComplete" setting. added "rightKey" sub-setting - when dropdown is shown, pressing ESC key should not create a new tag, but only hide the dropdown - improve the auto-comeplete setting with sub-settings for "enter" & "right" keys functionality (issue #103) - on fuzzy-search, only auto-complete the input with terms starts with the typed text - added loader animations to the CSS and "loading" method to Tagify - single-value select mode refactoring - demo page - suggestion list as tags that when clicked add the clicked tag - renamed jQuery event "remove" to "removeTag" #222 - make demo page header fixed to top - all triggered events return the instance's scope (tagify) - add methods to the README (replaceTag) - improved CSS dropdown animations (on show) - Show dropdown suggestions list on arrow down #333 - fixed #267 - Pasted text separated with new line symbol doesn't process correctly - fixed #356 - addTags not working on mix-mode - add boolean property to "this.dropdown" that would tell if the dropdown is shown or not - show suggestions dropdown when editing a tag - add event: "edit:keydown" - new event: "edit:input" - new event: "edit:change" - new event: "edit:start" - added dropdown ability to use css effects when showing - dropdown auto-adjusts its placement if there's no space for it at the bottom, it will flip to be above
Just released version |
Hi @yairEO, sorry to say it still does not work. Same settings as above, same data, Tagify updated to 3.1.0. |
@yairEO I use Firefox as primary browser and it was where I first noticed the problem. However I tried in Chrome (latest version) with the exact same code I posted and Tagify 3.1.0 and it did not work as well, behaved exactly the same as Firefox. I'm on macOS, so maybe that could be the issue? I'll try tomorrow when I get back to office and let you know. Also I'm always pasting with keyboard shortcuts (cmd+v), possibly it could make a difference as well? |
Hello @yairEO, it works in Chrome, I think I may have screwed up a little when I was trying it and only used the new JS, but not CSS and since the fix was in CSS, it did not work. However it still does not work in Firefox, could you please look into that? 🙂 |
I fixed it and will release the new version today. it's totally fixed so don't worry. I just prepared a big release with many other fixes issues and a few new features and am testing things now |
Please try |
@yairEO It works! Thank you very much. |
* bumps package version * changes to how the focus and dropdown reacts when clicking on the component several times in a row (and also on internal children, like a Tag or the input) * minor renaming * removing old code no longer needed * Improved html minifier method * Greatly improved mouseover dropdown items highlight speed * Bugfix - after selecting an item from the dropdown menu, clicking the ArrowRight will continuously add the last highlighted option again * fixed placeholder in mix-mode not being vertically well-placed * fixes #366 * fixes #367 * updated README * fix: mix-mode: starting to write a NEW tag and then clicking leftArrow and then Enter to select an option from the list will fail * fix: improved accuracy of dropdown position by rounding top & bottom values * fixes #267 * fixes ##362 (hopefully) * bumps package version * Partial fix: Firefox does not allow deleting tags in mix-mode * added ability to listen/remove multiple events, for the same callback * fixes #369 * added "getCSSVars" to read Tagify CSS variables (at least ones that matter) * fixes #369 * added "tagify--noTags" class to the main scope when needed * "invalid" event is now triggered *after* the invalid tag has been added to the DOM * added "getCSSVars" method which for now only reads the (new) "--tag-hide-transition" CSS variable and parses it, so the value is used in the "removeTag" method as timeout duration. * on mix-mode when "dropdown.enabled" is "0" do not show the suggestions dropdown when double-clicking the input. This is undesirable in mix-mode since it's not assumed the user wants to add any tags at all. * Firefox fix for placing the caret at the end of the input when the last child is a tag element
* bumps package version * - changes to how the focus and dropdown reacts when clicking on the component several times in a row (and also on internal children, like a Tag or the input) - minor renaming - removing old code no longer needed * - Improved html minifier method - Greatly improved mouseover dropdown items highlight speed * Bugfix - after selecting an item from the dropdown menu, clicking the ArrowRight will continuously add the last highlighted option again * fixed placeholder in mix-mode not being vertically well-placed * fixes #366 * - fixes #367 - updated README * fix: mix-mode: starting to write a NEW tag and then clicking leftArrow and then Enter to select an option from the list will fail fix: improved accuracy of dropdown position by rounding top & bottom values * fixes #267 * fixes ##362 (hopefully) * bumps package version * - Partial fix: Firefox does not allow deleting tags in mix-mode - added ability to listen/remove multiple events, for the same callback * - * fixes #369 * added "getCSSVars" to read Tagify CSS variables (at least ones that matter) * - fixes #369 - added "tagify--noTags" class to the main scope when needed - "invalid" event is now triggered *after* the invalid tag has been added to the DOM - added "getCSSVars" method which for now only reads the (new) "--tag-hide-transition" CSS variable and parses it, so the value is used in the "removeTag" method as timeout duration. * bumps package version * - version bump * - on mix-mode when "dropdown.enabled" is "0" do not show the suggestions dropdown when double-clicking the input. This is undesirable in mix-mode since it's not assumed the user wants to add any tags at all. - Firefox fix for placing the caret at the end of the input when the last child is a tag element * bumps package version * -
I have the latest version (2.22.3) and I have a code to initialize tagify:
If I paste lines like these, separated by new line symbol ('\n'):
And then click enter - it doesn't process text in a correct way:
As you can see it adds "||" symbols.
Pasting works fine if I paste text separated by comma or whitespace.
Thanks.
The text was updated successfully, but these errors were encountered: