Socket
Socket
Sign inDemoInstall

@codemirror/autocomplete

Package Overview
Dependencies
Maintainers
2
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemirror/autocomplete - npm Package Compare versions

Comparing version 0.19.13 to 0.19.14

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 0.19.14 (2022-03-10)
### Bug fixes
Make the ARIA attributes added to the editor during autocompletion spec-compliant.
## 0.19.13 (2022-02-18)

@@ -2,0 +8,0 @@

16

dist/index.js

@@ -513,2 +513,3 @@ import { Annotation, Facet, combineConfig, StateEffect, StateField, Prec, EditorSelection, Text, MapMode } from '@codemirror/state';

ul.setAttribute("role", "listbox");
ul.setAttribute("aria-expanded", "true");
for (let i = range.from; i < range.to; i++) {

@@ -574,3 +575,2 @@ let { completion, match } = options[i];

}
options.sort(cmpOption);
let result = [], prev = null;

@@ -608,6 +608,7 @@ for (let opt of options.sort(cmpOption)) {

let selectedValue = prev.options[prev.selected].completion;
for (let i = 0; i < options.length && !selected; i++) {
if (options[i].completion == selectedValue)
for (let i = 0; i < options.length; i++)
if (options[i].completion == selectedValue) {
selected = i;
}
break;
}
}

@@ -673,4 +674,3 @@ return new CompletionDialog(options, makeAttrs(id, selected), {

const baseAttrs = {
"aria-autocomplete": "list",
"aria-expanded": "false"
"aria-autocomplete": "list"
};

@@ -680,3 +680,3 @@ function makeAttrs(id, selected) {

"aria-autocomplete": "list",
"aria-expanded": "true",
"aria-haspopup": "listbox",
"aria-activedescendant": id + "-" + selected,

@@ -863,3 +863,3 @@ "aria-controls": id

if (doesReset ||
query.updates.length + update.transactions.length > MaxUpdateCount && query.time - Date.now() > MinAbortTime) {
query.updates.length + update.transactions.length > MaxUpdateCount && Date.now() - query.time > MinAbortTime) {
for (let handler of query.context.abortListeners) {

@@ -866,0 +866,0 @@ try {

{
"name": "@codemirror/autocomplete",
"version": "0.19.13",
"version": "0.19.14",
"description": "Autocompletion for the CodeMirror code editor",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

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