Socket
Socket
Sign inDemoInstall

@codemirror/autocomplete

Package Overview
Dependencies
Maintainers
2
Versions
77
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.8 to 0.19.9

6

CHANGELOG.md

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

## 0.19.9 (2021-11-26)
### Bug fixes
Fix an issue where info tooltips would be visible in an inappropriate position when there was no room to place them properly.
## 0.19.8 (2021-11-17)

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

14

dist/index.js

@@ -483,5 +483,5 @@ import { Annotation, Facet, combineConfig, StateEffect, StateField, Prec, EditorSelection, Text } from '@codemirror/state';

let rect = this.dom.getBoundingClientRect(), infoRect = this.info.getBoundingClientRect();
let top = Math.min(sel.getBoundingClientRect().top, innerHeight - infoRect.height) - rect.top;
if (top < 0 || top > this.list.clientHeight - 10)
if (rect.top > innerHeight - 10 || rect.bottom < 10)
return null;
let top = Math.max(0, Math.min(sel.getBoundingClientRect().top, innerHeight - infoRect.height)) - rect.top;
let left = this.view.textDirection == Direction.RTL;

@@ -496,6 +496,8 @@ let spaceLeft = rect.left, spaceRight = innerWidth - rect.right;

positionInfo(pos) {
if (this.info && pos) {
this.info.style.top = pos.top + "px";
this.info.classList.toggle("cm-completionInfo-left", pos.left);
this.info.classList.toggle("cm-completionInfo-right", !pos.left);
if (this.info) {
this.info.style.top = (pos ? pos.top : -1e6) + "px";
if (pos) {
this.info.classList.toggle("cm-completionInfo-left", pos.left);
this.info.classList.toggle("cm-completionInfo-right", !pos.left);
}
}

@@ -502,0 +504,0 @@ }

{
"name": "@codemirror/autocomplete",
"version": "0.19.8",
"version": "0.19.9",
"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