Skip to content

Commit

Permalink
4.17.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Yair Even Or authored and Yair Even Or committed Dec 4, 2022
1 parent 16cc41c commit fe8738a
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions dist/jQuery.tagify.min.js

Large diffs are not rendered by default.

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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions dist/tagify.esm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Tagify (v 4.17.5) - tags input component
* Tagify (v 4.17.6) - tags input component
* By undefined
* https://github.com/yairEO/tagify
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -1522,13 +1522,13 @@ var events = {
tagBeforeCaret,
tagElmToBeDeleted,
firstTextNodeBeforeTag;
if (_s.backspace == 'edit' && isCaretAfterTag instanceof Element) {
if (_s.backspace == 'edit' && isCaretAfterTag) {
tagBeforeCaret = sel.anchorNode.nodeType == 1 ? null : sel.anchorNode.previousElementSibling;
setTimeout(this.editTag.bind(this), 0, tagBeforeCaret); // timeout is needed to the last cahacrter in the edited tag won't get deleted
e.preventDefault(); // needed so the tag elm won't get deleted
return;
}
if (isChromeAndroidBrowser() && isCaretAfterTag) {
if (isChromeAndroidBrowser() && isCaretAfterTag instanceof Element) {
firstTextNodeBeforeTag = getfirstTextNode(isCaretAfterTag);
if (!isCaretAfterTag.hasAttribute('readonly')) isCaretAfterTag.remove(); // since this is Chrome, can safetly use this "new" DOM API

Expand All @@ -1549,7 +1549,7 @@ var events = {
? lastTagElems[0] : null;else tagElmToBeDeleted = lastTagElems[Math.min(lastTagElems.length, sel.anchorOffset) - 1];

// find out if a tag *might* be a candidate for deletion, and if so, which
} else if (deleteKeyTagDetected) tagElmToBeDeleted = sel.anchorNode.nextElementSibling;else if (isCaretAfterTag) tagElmToBeDeleted = isCaretAfterTag;
} else if (deleteKeyTagDetected) tagElmToBeDeleted = sel.anchorNode.nextElementSibling;else if (isCaretAfterTag instanceof Element) tagElmToBeDeleted = isCaretAfterTag;

// tagElm.hasAttribute('readonly')
if (sel.anchorNode.nodeType == 3 &&
Expand Down
8 changes: 4 additions & 4 deletions dist/tagify.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Tagify (v 4.17.5) - tags input component
* Tagify (v 4.17.6) - tags input component
* By undefined
* https://github.com/yairEO/tagify
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -1528,13 +1528,13 @@
tagBeforeCaret,
tagElmToBeDeleted,
firstTextNodeBeforeTag;
if (_s.backspace == 'edit' && isCaretAfterTag instanceof Element) {
if (_s.backspace == 'edit' && isCaretAfterTag) {
tagBeforeCaret = sel.anchorNode.nodeType == 1 ? null : sel.anchorNode.previousElementSibling;
setTimeout(this.editTag.bind(this), 0, tagBeforeCaret); // timeout is needed to the last cahacrter in the edited tag won't get deleted
e.preventDefault(); // needed so the tag elm won't get deleted
return;
}
if (isChromeAndroidBrowser() && isCaretAfterTag) {
if (isChromeAndroidBrowser() && isCaretAfterTag instanceof Element) {
firstTextNodeBeforeTag = getfirstTextNode(isCaretAfterTag);
if (!isCaretAfterTag.hasAttribute('readonly')) isCaretAfterTag.remove(); // since this is Chrome, can safetly use this "new" DOM API

Expand All @@ -1555,7 +1555,7 @@
? lastTagElems[0] : null;else tagElmToBeDeleted = lastTagElems[Math.min(lastTagElems.length, sel.anchorOffset) - 1];

// find out if a tag *might* be a candidate for deletion, and if so, which
} else if (deleteKeyTagDetected) tagElmToBeDeleted = sel.anchorNode.nextElementSibling;else if (isCaretAfterTag) tagElmToBeDeleted = isCaretAfterTag;
} else if (deleteKeyTagDetected) tagElmToBeDeleted = sel.anchorNode.nextElementSibling;else if (isCaretAfterTag instanceof Element) tagElmToBeDeleted = isCaretAfterTag;

// tagElm.hasAttribute('readonly')
if (sel.anchorNode.nodeType == 3 &&
Expand Down
4 changes: 2 additions & 2 deletions dist/tagify.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/tagify.polyfills.min.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Tagify (v 4.17.5) - tags input component
* Tagify (v 4.17.6) - tags input component
* By undefined
* https://github.com/yairEO/tagify
* Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@yaireo/tagify",
"version": "4.17.5",
"version": "4.17.6",
"homepage": "https://github.com/yairEO/tagify",
"description": "lightweight, efficient Tags input component in Vanilla JS / React / Angular [super customizable, tiny size & top performance]",
"keywords": [
Expand Down

0 comments on commit fe8738a

Please sign in to comment.