Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Commit

Permalink
v2.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Mobius1 committed Mar 30, 2017
1 parent ca0e706 commit b51a114
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ new Selectr('#mySelect', {

## Change Log

### v2.1.3
* Fixed bug with tagging system

### v2.1.2

* New option `closeOnScroll` ([#11](https://github.com/Mobius1/Selectr/issues/11)) (see [docs](http://mobius.ovh/docs/selectr/pages/options))
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mobius1-selectr",
"version": "2.1.2",
"version": "2.1.3",
"ignore": [
".gitattributes",
"README.md"
Expand Down
4 changes: 2 additions & 2 deletions dist/selectr.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mobius1-selectr",
"version": "2.1.2",
"version": "2.1.3",
"description": "A lightweight dependency-free javascript select box replacement.",
"main": "dist/selectr.min.js",
"scripts": {
Expand Down
10 changes: 7 additions & 3 deletions src/selectr.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Selectr 2.1.2
* Selectr 2.1.3
* http://mobius.ovh/docs/selectr
*
* Released under the MIT license
Expand Down Expand Up @@ -712,9 +712,13 @@
_.navigating = false;
}

if ( _.input && _.input.value.length ) {
if ( _.settings.taggable && _.input.value.length ) {
var value = _.input.value.trim();

if ( _.searchItems.length ) {
return false;
}

if ( e.which === 13 || util.includes(_.tagSeperators, e.key) ) {

util.each(_.tagSeperators, function(i,k) {
Expand Down Expand Up @@ -759,7 +763,7 @@
switch (key) {
case 13:
if ( _.settings.taggable && _.input === document.activeElement ) {
return;
_.input.value = "";
}
var opt = _.optsOptions.querySelector(".active");
var index = _.items.indexOf(opt);
Expand Down

0 comments on commit b51a114

Please sign in to comment.