Skip to content

Commit

Permalink
Issue yairEO#1331 by gxleano: Fix warning on tag addition via enter key
Browse files Browse the repository at this point in the history
  • Loading branch information
David Galeano committed Apr 28, 2024
1 parent 3ecfbc2 commit d7ecdc6
Show file tree
Hide file tree
Showing 7 changed files with 8,987 additions and 8 deletions.
4,401 changes: 4,400 additions & 1 deletion dist/react.tagify.jsx

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/react.tagify.jsx.map

Large diffs are not rendered by default.

3,971 changes: 3,970 additions & 1 deletion dist/tagify.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/tagify.js.map

Large diffs are not rendered by default.

612 changes: 611 additions & 1 deletion dist/tagify.polyfills.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/tagify.polyfills.min.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/parts/events.js
Expand Up @@ -275,7 +275,8 @@ export default {
isReadyOnlyTag = isBelong && focusedElm.hasAttribute('readonly'),
nextTag;

if( !this.state.hasFocus && (!isBelong || isReadyOnlyTag) ) return;
//if( !isBelong || isReadyOnlyTag ) return;
if( !isBelong || isReadyOnlyTag ) return;

nextTag = focusedElm.nextElementSibling;

Expand All @@ -293,7 +294,7 @@ export default {
}

case 'Enter': {
if( targetIsRemoveBtn ) {
if( targetIsRemoveBtn && this.state.hasFocus) {
this.removeTags( e.target.parentNode )
return
}
Expand Down

0 comments on commit d7ecdc6

Please sign in to comment.