Comments (10)
just realized this is because its a wrong tag, the thing is, I can still post my form. At first there was an error message, but it would disappear instantly.
from tags-input.
Are you using the pattern
attribute for validation, or is this just for duplicate rags?
from tags-input.
I was using the pattern, since it came from the example, but I removed it, and it's still doing it.
from tags-input.
Just so I'm following correctly - the issue is that submitting the form includes the invalid tag?
from tags-input.
What happens is that whenever you leave the tags container (blur), the invalid tag is included for a split second, this results in the red color showing up really short.
from tags-input.
upon further inspection, it appears the class dupe is added to the span
tag with data-tag="tag"
I think this happens because when you leave the input field, it checks if there already is a tag like it, which there is, because that tag hasn't been removed yet. That's as far as I could see at least.
from tags-input.
Leaving the field via blur actually commits the tag you were typing, same as pressing enter. This sort-of seems like the intended behavior - it was done because users would leave their last tag as text in the field otherwise, and it would not be committed and sent with a form.
from tags-input.
Ahh nevermind, I totally see what you're seeing. When you leave the field, even without a value currently typed, all of the existing tags turn red. Good catch, I'll try to get a fix in for that.
from tags-input.
No probz, Amazing work btw. This code should be default in HTML, it's great to have for a cms, as I'm in the middle of developing one!
from tags-input.
Thanks for the praise 😊
The fix is released as version 1.1.1
🎉
from tags-input.
Related Issues (14)
- ToDo: Convert to ES2015, use Babel HOT 1
- JSFiddle Demo is broken. HOT 2
- JSFiddle Demo is broken. HOT 1
- browser support HOT 1
- pattern= doesn't seem to work as expected HOT 2
- Keyboard events created with DOM don't trigger
- Long placeholders get cut off
- Unexpected behaivor on Russian keyboard layout
- Wrong key code on Turkish keyboard
- Please delete.
- Height of input briefly doubles for a moment while adding first tag HOT 1
- Should copy some attributes from source input (eg: spellcheck)
- MIT or 3 clause BSD HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tags-input.