New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@vaadin/vaadin-custom-field

Package Overview
Dependencies
Maintainers
16
Versions
259
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/vaadin-custom-field - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

2

package.json

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

"name": "@vaadin/vaadin-custom-field",
"version": "1.0.8",
"version": "1.0.9",
"main": "vaadin-custom-field.js",

@@ -16,0 +16,0 @@ "author": "Vaadin Ltd",

@@ -83,4 +83,13 @@ import { FlattenedNodesObserver } from '@polymer/polymer/lib/utils/flattened-nodes-observer.js';

const isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
this.addEventListener('keydown', e => {
if (e.keyCode === 9) {
// FIXME (yuriy): remove this workaround once this issue is fixed:
// https://bugs.chromium.org/p/chromium/issues/detail?id=1014868&can=2&num=100&q=slot%20shift%20tab
if (e.target.parentElement.localName === 'slot' &&
!e.defaultPrevented && isChrome) {
const slot = e.target.parentElement;
slot.setAttribute('tabindex', -1);
setTimeout(() => slot.removeAttribute('tabindex'));
}
if (this.inputs.indexOf(e.target) < this.inputs.length - 1 && !e.shiftKey ||

@@ -138,15 +147,19 @@ this.inputs.indexOf(e.target) > 0 && e.shiftKey) {

/* Like querySelectorAll('*') but also gets all elements through any nested slots recursively */
__queryAllAssignedElements(elem) {
const result = [];
let elements;
if (elem.tagName === 'SLOT') {
elements = elem.assignedNodes({flatten: true}).filter(node => node.nodeType === Node.ELEMENT_NODE);
} else {
result.push(elem);
elements = Array.from(elem.children);
}
elements.forEach(elem => result.push(...this.__queryAllAssignedElements(elem)));
return result;
}
__getInputsFromSlot() {
const isInput = (node => node.validate || node.checkValidity);
const slottedElements = this.$.slot.assignedNodes({flatten: true}).filter(node => node.nodeType === Node.ELEMENT_NODE);
const inputs = [];
slottedElements.forEach(elem => {
if (isInput(elem)) {
inputs.push(elem);
} else {
const newInputs = Array.from(elem.querySelectorAll('*')).filter(isInput);
inputs.push(...newInputs);
}
});
return inputs;
return this.__queryAllAssignedElements(this.$.slot).filter(isInput);
}

@@ -153,0 +166,0 @@

@@ -92,3 +92,3 @@ /**

static get version() {
return '1.0.8';
return '1.0.9';
}

@@ -95,0 +95,0 @@

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