Socket
Socket
Sign inDemoInstall

@codemirror/tooltip

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemirror/tooltip - npm Package Compare versions

Comparing version 0.17.1 to 0.17.2

6

CHANGELOG.md

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

## 0.17.2 (2021-01-14)
### Bug fixes
Fix tooltip positioning on iOS, which still handles position: fixed strangely.
## 0.17.1 (2021-01-06)

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

14

dist/index.js
import { ViewPlugin, themeClass, Direction, EditorView } from '@codemirror/view';
import { Facet, StateEffect, StateField, MapMode } from '@codemirror/state';
const ios = typeof navigator != "undefined" &&
!/Edge\/(\d+)/.exec(navigator.userAgent) && /Apple Computer/.test(navigator.vendor) &&
(/Mobile\/\w+/.test(navigator.userAgent) || navigator.maxTouchPoints > 2);
const Outside = "-10000px";

@@ -82,4 +85,11 @@ const tooltipPlugin = ViewPlugin.fromClass(class {

above = !above;
dom.style.top = (above ? pos.top - height : pos.bottom) + "px";
dom.style.left = left + "px";
if (ios) {
dom.style.top = ((above ? pos.top - height : pos.bottom) - editor.top) + "px";
dom.style.left = (left - editor.left) + "px";
dom.style.position = "absolute";
}
else {
dom.style.top = (above ? pos.top - height : pos.bottom) + "px";
dom.style.left = left + "px";
}
dom.classList.toggle("cm-tooltip-above", above);

@@ -86,0 +96,0 @@ dom.classList.toggle("cm-tooltip-below", !above);

2

package.json
{
"name": "@codemirror/tooltip",
"version": "0.17.1",
"version": "0.17.2",
"description": "Tooltip support for the CodeMirror code editor",

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

Sorry, the diff of this file is not supported yet

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