@vaadin/vaadin-select
Advanced tools
Comparing version 2.0.4 to 2.1.0-alpha1
@@ -13,3 +13,3 @@ { | ||
"name": "@vaadin/vaadin-select", | ||
"version": "2.0.4", | ||
"version": "2.1.0-alpha1", | ||
"main": "vaadin-select.js", | ||
@@ -40,2 +40,3 @@ "author": "Vaadin Ltd", | ||
"@vaadin/vaadin-list-box": "^1.1.0", | ||
"@vaadin/vaadin-list-mixin": "^2.2.0", | ||
"@vaadin/vaadin-item": "^2.1.0", | ||
@@ -42,0 +43,0 @@ "@vaadin/vaadin-overlay": "^3.2.0", |
@@ -182,3 +182,3 @@ /** | ||
static get version() { | ||
return '2.0.4'; | ||
return '2.1.0-alpha1'; | ||
} | ||
@@ -468,5 +468,15 @@ | ||
_onKeyDown(e) { | ||
if (!this.readonly && !this.opened && /^(ArrowDown|Down|ArrowUp|Up|Enter|SpaceBar| )$/.test(e.key)) { | ||
e.preventDefault(); | ||
this.opened = true; | ||
if (!this.readonly && !this.opened) { | ||
if (/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/.test(e.key)) { | ||
e.preventDefault(); | ||
this.opened = true; | ||
} else if (/[a-zA-Z0-9]/.test(e.key) && e.key.length === 1) { | ||
const selected = this._menuElement.selected; | ||
const currentIdx = selected !== undefined ? selected : -1; | ||
const newIdx = this._menuElement._searchKey(currentIdx, e.key); | ||
if (newIdx >= 0) { | ||
this._updateSelectedItem(this._items[newIdx].value, this._items); | ||
} | ||
} | ||
} | ||
@@ -473,0 +483,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46417
789
13
1
1