Skip to content

Commit

Permalink
fixes #267
Browse files Browse the repository at this point in the history
  • Loading branch information
yairEO committed Aug 17, 2019
1 parent 4e1d5fb commit f77ad60
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion dist/jQuery.tagify.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/tagify.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ Tagify.prototype = {
*/
callbacks: {
onFocusBlur: function onFocusBlur(e) {
var s = e.target.textContent.trim();
var s = e.target.textContent.trim(); // a string

if (this.settings.mode == 'mix') return;

if (e.type == "focus") {
Expand All @@ -348,8 +349,7 @@ Tagify.prototype = {
onKeydown: function onKeydown(e) {
var _this3 = this;

var s = e.target.textContent,
lastTag,
var s = e.target.textContent.trim(),
tags;

if (this.settings.mode == 'mix') {
Expand Down Expand Up @@ -401,7 +401,7 @@ Tagify.prototype = {
case 'Enter':
e.preventDefault(); // solves Chrome bug - http://stackoverflow.com/a/20398191/104380

this.addTags(this.input.value || s, true);
this.addTags(s, true);
}
},
onInput: function onInput(e) {
Expand Down
2 changes: 1 addition & 1 deletion dist/tagify.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/tagify.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ Tagify.prototype = {
*/
callbacks : {
onFocusBlur(e){
var s = e.target.textContent.trim();
var s = e.target.textContent.trim(); // a string

if( this.settings.mode == 'mix' ) return;

Expand All @@ -347,8 +347,8 @@ Tagify.prototype = {
},

onKeydown(e){
var s = e.target.textContent,
lastTag, tags;
var s = e.target.textContent.trim(),
tags;

if( this.settings.mode == 'mix' ){
switch( e.key ){
Expand Down Expand Up @@ -394,7 +394,7 @@ Tagify.prototype = {

case 'Enter' :
e.preventDefault(); // solves Chrome bug - http://stackoverflow.com/a/20398191/104380
this.addTags(this.input.value || s, true)
this.addTags(s, true)
}
},

Expand Down
2 changes: 1 addition & 1 deletion test/tagify.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ describe("mixed-mode", () => {
expect(result).toEqual(expected);
}, 0)

fit("should update textarea on deleted tag", async (done) => {
it("should update textarea on deleted tag", async (done) => {
await page.waitForSelector(elmSelectors.mixed.firstTag);
await page.click(elmSelectors.mixed.firstTag + " .tagify__tag__removeBtn", { clickCount:1 });

Expand Down

0 comments on commit f77ad60

Please sign in to comment.