Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vaadin/vaadin-list-mixin

Package Overview
Dependencies
Maintainers
16
Versions
255
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/vaadin-list-mixin - npm Package Compare versions

Comparing version 2.3.1 to 2.4.0-alpha1

7

package.json

@@ -13,3 +13,3 @@ {

"name": "@vaadin/vaadin-list-mixin",
"version": "2.3.1",
"version": "2.4.0-alpha1",
"main": "vaadin-list-mixin.js",

@@ -36,4 +36,7 @@ "author": "Vaadin Ltd",

"wct-browser-legacy": "^1.0.1",
"@webcomponents/webcomponentsjs": "^2.0.0"
"@webcomponents/webcomponentsjs": "^2.0.0",
"@vaadin/vaadin-context-menu": "^4.3.13",
"@vaadin/vaadin-select": "^2.1.6",
"@vaadin/vaadin-tabs": "^3.0.5"
}
}

@@ -136,3 +136,3 @@ /**

const increment = 1;
const condition = item => !item.disabled &&
const condition = item => !(item.disabled || this._isItemHidden(item)) &&
item.textContent.replace(/[^a-zA-Z0-9]/g, '').toLowerCase().indexOf(this._searchBuf) === 0;

@@ -166,15 +166,18 @@

const condition = item => !item.disabled;
const condition = item => !(item.disabled || this._isItemHidden(item));
let idx, increment;
const isRTL = !this._vertical && this.getAttribute('dir') === 'rtl';
const dirIncrement = isRTL ? -1 : 1;
if (this._vertical && key === 'Up' || !this._vertical && key === 'Left') {
increment = -1;
idx = currentIdx - 1;
increment = -dirIncrement;
idx = currentIdx - dirIncrement;
} else if (this._vertical && key === 'Down' || !this._vertical && key === 'Right') {
increment = dirIncrement;
idx = currentIdx + dirIncrement;
} else if ((key === 'Home' && !isRTL) || (key === 'End' && isRTL)) {
increment = 1;
idx = currentIdx + 1;
} else if (key === 'Home') {
increment = 1;
idx = 0;
} else if (key === 'End') {
} else if ((key === 'End' && !isRTL) || (key === 'Home' && isRTL)) {
increment = -1;

@@ -201,2 +204,3 @@ idx = this.items.length - 1;

const item = this.items[idx];
if (condition(item)) {

@@ -209,2 +213,6 @@ return idx;

_isItemHidden(item) {
return getComputedStyle(item).display === 'none';
}
_setFocusable(idx) {

@@ -211,0 +219,0 @@ idx = this._getAvailableIndex(idx, 1, item => !item.disabled);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc