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

slim-select

Package Overview
Dependencies
Maintainers
1
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slim-select - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

4

package.json
{
"name": "slim-select",
"description": "Slim vanilla javascript select dropdown",
"version": "1.4.1",
"version": "1.4.2",
"author": "Brian Voelker <brian@webiswhatido.com> (http://webiswhatido.com)",

@@ -35,4 +35,4 @@ "homepage": "https://slimselectjs.com",

"highlightjs": "^9.10.0",
"vue-build": "^2.1.1"
"vue-build": "^2.1.2"
}
}

@@ -290,5 +290,7 @@ import SlimSelect from './index'

if (e.key === 'ArrowUp') {
this.main.open()
this.highlightUp()
e.preventDefault()
} else if (e.key === 'ArrowDown') {
this.main.open()
this.highlightDown()

@@ -330,3 +332,11 @@ e.preventDefault()

if (highlighted) {
prev = highlighted.previousSibling
prev = <HTMLDivElement>highlighted.previousSibling
while (prev !== null) {
if (prev.classList.contains(this.main.config.disabled)) {
prev = <HTMLDivElement>prev.previousSibling
continue
} else {
break
}
}
} else {

@@ -345,3 +355,6 @@ var allOptions = this.list.querySelectorAll('.' + this.main.config.option + ':not(.'+this.main.config.disabled+')')

if (parent.previousSibling) {
prev = parent.previousSibling.childNodes[parent.previousSibling.childNodes.length - 1]
let prevNodes = (<HTMLDivElement>parent.previousSibling).querySelectorAll('.' + this.main.config.option + ':not(.'+this.main.config.disabled+')')
if (prevNodes.length) {
prev = prevNodes[prevNodes.length - 1]
}
}

@@ -361,10 +374,20 @@ }

var highlighted = <HTMLDivElement>this.list.querySelector('.' + this.main.config.highlighted)
var next = (
highlighted ?
<HTMLDivElement>highlighted.nextSibling :
<HTMLDivElement>this.list.querySelector('.' + this.main.config.option + ':not(.'+this.main.config.disabled+')')
)
var next = null
if (highlighted) {
next = <HTMLDivElement>highlighted.nextSibling
while (next !== null) {
if (next.classList.contains(this.main.config.disabled)) {
next = <HTMLDivElement>next.nextSibling
continue
} else {
break
}
}
} else {
next = <HTMLDivElement>this.list.querySelector('.' + this.main.config.option + ':not(.'+this.main.config.disabled+')')
}
// Check if parent is optgroup
if (next === null) {
if (next === null && highlighted !== null) {
var parent = <HTMLDivElement>highlighted.parentNode

@@ -371,0 +394,0 @@ if (parent.classList.contains(this.main.config.optgroup)) {

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