GithubHelp home page GithubHelp logo

Comments (7)

yairEO avatar yairEO commented on May 23, 2024 1

OK I've made it so the tabKey setting you've suggested will only autocomplete but won't convert it into a tag, unless tab is pressed again. Will be available on next Tagify release (very soon)

from tagify.

yairEO avatar yairEO commented on May 23, 2024

Tab key currently adds the input as a tag, and is mapped just like the Enter key.

just yesterday I've coded a new setting called addTagOn with the value ['blur', 'tab', 'enter'] so if one would want to not have the Tab key creating a tag of whatever is typed in the Tagify field, it's much easier now with this setting.

This is problematic because autoComplete: { rightKey: true } only says "when clicking the right arrow key, auto-complete & also convert to a tag" while false means only to autocomplete.

This means a tabKey would also need to act the same way, which will mean I would have to disable
the current way the Tab key works, which might cause issues for other users since it was coded like this for many years now..

from tagify.

Levivb avatar Levivb commented on May 23, 2024

Coincidentally, I just upgraded from 2.31.3 to 4.18.1 (I know, I know 😅). The tab key used to work in v2.31 kinda as the enter key does in in the latest version - albeit it was a bit more intuitive back then since you now have to explicitly select an option from the selection list before the enter/tab can be applied. In 2.31 the first hit from the dropdown was automatically applied when pressing enter/tab

from tagify.

jzohrab avatar jzohrab commented on May 23, 2024

Thank you @yairEO , appreciate the time!

from tagify.

Levivb avatar Levivb commented on May 23, 2024

It occurred to me that the required dropdown selection is only needed when working with the Ajax Whitelist (https://github.com/yairEO/tagify/tree/2d2a5a1e0e6c4a7badb7616e593634c70b3b5574?tab=readme-ov-file#ajax-whitelist)

But a second time hitting tab seems to be required. The first tab autocompletes the selected option from the dropdown and stays in edit mode and a second tab creates an actual tag from the addition.

See difference (.mov files):
Tagify 2.31 - 1.8MB
https://github.com/yairEO/tagify/assets/2494320/cdd32134-b0b5-4705-88bf-fc5ea9ad3671

Tagify 4.18 - 1.7MB
https://github.com/yairEO/tagify/assets/2494320/26c23d1f-042c-454b-8966-7e68a20e63c9

*keyboard input shown with KeyCastr

from tagify.

yairEO avatar yairEO commented on May 23, 2024

Coincidentally, I just upgraded from 2.31.3 to 4.18.1 (I know, I know 😅). The tab key used to work in v2.31 kinda as the enter key does in in the latest version - albeit it was a bit more intuitive back then since you now have to explicitly select an option from the selection list before the enter/tab can be applied. In 2.31 the first hit from the dropdown was automatically applied when pressing enter/tab

You can set dropdown.highlightFirst setting to true and this will for sure have something highlighted so Tab key will autocomplete.

As it is now, if nothing from the suggestions dropdown is highlighted then autocomplete won't work, forgot why it's like that :)

from tagify.

Levivb avatar Levivb commented on May 23, 2024

Thanks :)

I'll update the library, that should work as well - e5ffe6d

from tagify.

Related Issues (20)

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.