From 1073421ec0c842186c20d44c7b09b3636577c4d6 Mon Sep 17 00:00:00 2001 From: jiangfangtao Date: Fri, 30 Jun 2017 17:12:53 +0800 Subject: [PATCH 1/4] add support for the space key --- .idea/jQuery-Tags-Input.iml | 12 +++ .idea/jsLibraryMappings.xml | 6 ++ .idea/misc.xml | 12 +++ .idea/modules.xml | 8 ++ .idea/vcs.xml | 6 ++ .idea/workspace.xml | 203 ++++++++++++++++++++++++++++++++++++ src/jquery.tagsinput.js | 3 +- 7 files changed, 249 insertions(+), 1 deletion(-) create mode 100644 .idea/jQuery-Tags-Input.iml create mode 100644 .idea/jsLibraryMappings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml diff --git a/.idea/jQuery-Tags-Input.iml b/.idea/jQuery-Tags-Input.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/jQuery-Tags-Input.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml new file mode 100644 index 0000000..b8387eb --- /dev/null +++ b/.idea/jsLibraryMappings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..ade193e --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,12 @@ + + + + + + false + + false + false + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..2c44ea1 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..1793eb8 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + DEFINITION_ORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1498813015504 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/jquery.tagsinput.js b/src/jquery.tagsinput.js index b6c75e4..327c087 100644 --- a/src/jquery.tagsinput.js +++ b/src/jquery.tagsinput.js @@ -301,6 +301,7 @@ } // if user types a default delimiter like comma,semicolon and then create a new tag $(data.fake_input).bind('keypress',data,function(event) { + console.log('keypress'); if (_checkDelimiter(event)) { event.preventDefault(); if( (event.data.minChars <= $(event.data.fake_input).val().length) && (!event.data.maxChars || (event.data.maxChars >= $(event.data.fake_input).val().length)) ) @@ -369,7 +370,7 @@ */ var _checkDelimiter = function(event){ var found = false; - if (event.which == 13) { + if (event.which == 13 || event.which == 32) { return true; } From 63722a016225b15e4b29f6b36509d5bdb8b8d81e Mon Sep 17 00:00:00 2001 From: jiangfangtao Date: Fri, 30 Jun 2017 17:15:13 +0800 Subject: [PATCH 2/4] add support for the space key --- .gitignore | 1 + .idea/workspace.xml | 91 +++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 84 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 108b96b..f07e76e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules/ bower_components/ lib/ +.idea \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 1793eb8..655b76b 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,9 +2,8 @@ - - - + + @@ -25,7 +24,7 @@ - + @@ -37,6 +36,16 @@ + + + + + + + + + + @@ -56,6 +65,7 @@ @@ -121,13 +131,70 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project + + + true + + + + DIRECTORY + + false + + - @@ -158,7 +225,7 @@ - + @@ -199,5 +266,13 @@ + + + + + + + + \ No newline at end of file From 3dd31ceb75144e26fb146529c3ec451dd48ae5f5 Mon Sep 17 00:00:00 2001 From: shixinke Date: Fri, 30 Jun 2017 17:17:27 +0800 Subject: [PATCH 3/4] add support for the space key --- .gitignore | 2 +- .idea/workspace.xml | 37 +++++++++++++++++++------------------ src/jquery.tagsinput.js | 1 + 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index f07e76e..825808e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ node_modules/ bower_components/ lib/ -.idea \ No newline at end of file +.idea/ \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 655b76b..5f07d67 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,6 +4,7 @@ + @@ -24,11 +25,11 @@ - + - - + + @@ -36,11 +37,11 @@ - + - + @@ -64,8 +65,8 @@ @@ -206,12 +207,12 @@ - @@ -248,6 +249,14 @@ + + + + + + + + @@ -258,21 +267,13 @@ - - + + - - - - - - - - \ No newline at end of file diff --git a/src/jquery.tagsinput.js b/src/jquery.tagsinput.js index 327c087..443ff17 100644 --- a/src/jquery.tagsinput.js +++ b/src/jquery.tagsinput.js @@ -370,6 +370,7 @@ */ var _checkDelimiter = function(event){ var found = false; + //(add support for the space key) if (event.which == 13 || event.which == 32) { return true; } From 57d5560138ce2a869cea9ee59195404241242433 Mon Sep 17 00:00:00 2001 From: shixinke Date: Fri, 30 Jun 2017 17:20:49 +0800 Subject: [PATCH 4/4] remove idea directory --- .idea/jQuery-Tags-Input.iml | 12 -- .idea/jsLibraryMappings.xml | 6 - .idea/misc.xml | 12 -- .idea/modules.xml | 8 -- .idea/vcs.xml | 6 - .idea/workspace.xml | 279 ------------------------------------ 6 files changed, 323 deletions(-) delete mode 100644 .idea/jQuery-Tags-Input.iml delete mode 100644 .idea/jsLibraryMappings.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml delete mode 100644 .idea/workspace.xml diff --git a/.idea/jQuery-Tags-Input.iml b/.idea/jQuery-Tags-Input.iml deleted file mode 100644 index 24643cc..0000000 --- a/.idea/jQuery-Tags-Input.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml deleted file mode 100644 index b8387eb..0000000 --- a/.idea/jsLibraryMappings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index ade193e..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - false - - false - false - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 2c44ea1..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index 5f07d67..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - DEFINITION_ORDER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - project - - - true - - - - DIRECTORY - - false - - - - - - - - - 1498813015504 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file