Skip to content

Commit

Permalink
bugfix - when tags are styles to render "outside" of the tagify compo…
Browse files Browse the repository at this point in the history
…nent, the dropdown should not be visisble when clicking outside the input box
  • Loading branch information
yairEO committed Apr 11, 2024
1 parent f5b8ac5 commit 6779018
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1749,6 +1749,7 @@ <h3>Javascript</h3>
// init Tagify script on the above inputs
var tagify = new Tagify(input, {
whitelist: ["foo", "bar", "baz"],
focusable: false,
dropdown: {
position: "input",
enabled : 0 // always opens dropdown when input gets focus
Expand Down
2 changes: 1 addition & 1 deletion src/parts/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ export default {
this.fixFirefoxLastTagNoCaret()
}

if( timeDiffFocus > 500 ){
if( timeDiffFocus > 500 || !_s.focusable ){
if( this.state.dropdown.visible )
this.dropdown.hide()
else if( _s.dropdown.enabled === 0 && _s.mode != 'mix' )
Expand Down

0 comments on commit 6779018

Please sign in to comment.