Git Product home page Git Product logo

Comments (10)

bramkorsten avatar bramkorsten commented on July 22, 2024

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.

developit avatar developit commented on July 22, 2024

Are you using the pattern attribute for validation, or is this just for duplicate rags?

from tags-input.

bramkorsten avatar bramkorsten commented on July 22, 2024

I was using the pattern, since it came from the example, but I removed it, and it's still doing it.

from tags-input.

developit avatar developit commented on July 22, 2024

Just so I'm following correctly - the issue is that submitting the form includes the invalid tag?

from tags-input.

bramkorsten avatar bramkorsten commented on July 22, 2024

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.

bramkorsten avatar bramkorsten commented on July 22, 2024

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.

developit avatar developit commented on July 22, 2024

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.

developit avatar developit commented on July 22, 2024

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.

bramkorsten avatar bramkorsten commented on July 22, 2024

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.

developit avatar developit commented on July 22, 2024

Thanks for the praise 😊
The fix is released as version 1.1.1 🎉

from tags-input.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.