@codemirror/autocomplete 6.10.0 → 6.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.cjs +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -472,6 +472,7 @@ class CompletionTooltip {
|
|
|
472
472
|
this.dom.className = "cm-tooltip-autocomplete";
|
|
473
473
|
this.updateTooltipClass(view.state);
|
|
474
474
|
this.dom.addEventListener("mousedown", (e) => {
|
|
475
|
+
let { options } = view.state.field(stateField).open;
|
|
475
476
|
for (let dom = e.target, match; dom && dom != this.dom; dom = dom.parentNode) {
|
|
476
477
|
if (dom.nodeName == "LI" && (match = /-(\d+)$/.exec(dom.id)) && +match[1] < options.length) {
|
|
477
478
|
this.applyCompletion(view, options[+match[1]]);
|
package/dist/index.js
CHANGED
|
@@ -470,6 +470,7 @@ class CompletionTooltip {
|
|
|
470
470
|
this.dom.className = "cm-tooltip-autocomplete";
|
|
471
471
|
this.updateTooltipClass(view.state);
|
|
472
472
|
this.dom.addEventListener("mousedown", (e) => {
|
|
473
|
+
let { options } = view.state.field(stateField).open;
|
|
473
474
|
for (let dom = e.target, match; dom && dom != this.dom; dom = dom.parentNode) {
|
|
474
475
|
if (dom.nodeName == "LI" && (match = /-(\d+)$/.exec(dom.id)) && +match[1] < options.length) {
|
|
475
476
|
this.applyCompletion(view, options[+match[1]]);
|