🚀. Socket Launch Week Day 2:Introducing Manifest Alerts.Learn more
Sign In

@datocms/content-link

Package Overview
Dependencies
Maintainers
7
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datocms/content-link - npm Package Compare versions

Comparing version
0.3.20
to
0.3.21
+1
-1
package.json
{
"name": "@datocms/content-link",
"version": "0.3.20",
"version": "0.3.21",
"description": "Lightweight library for DatoCMS visual editing overlays and content links.",

@@ -5,0 +5,0 @@ "type": "module",

@@ -9,2 +9,3 @@ /**

inIframe,
isEditableElementFocused,
isKeyboardEvent,

@@ -313,2 +314,6 @@ isMouseEvent,

if (isEditableElementFocused(this.document)) {
return;
}
this.enableTemporaryClickToEditState();

@@ -326,2 +331,6 @@ }

if (isEditableElementFocused(this.document)) {
return;
}
this.disableTemporaryClickToEditState();

@@ -328,0 +337,0 @@ }

@@ -61,2 +61,14 @@ import { type Options, compute as computeScrollIntoView } from 'compute-scroll-into-view';

export function isEditableElementFocused(document: Document): boolean {
const active = document.activeElement as HTMLElement | null;
if (!active) {
return false;
}
const tag = active.tagName;
if (tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT') {
return true;
}
return active.isContentEditable;
}
/** Compute the bounding box for the target element, ignoring zero-size or hidden nodes. */

@@ -63,0 +75,0 @@ export function measure(

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display