Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

@daybrush/drag

Package Overview
Dependencies
1
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.18.1 to 0.18.2

2

package.json
{
"name": "@daybrush/drag",
"version": "0.18.1",
"version": "0.18.2",
"description": "You can set up drag events in any browser.",

@@ -5,0 +5,0 @@ "main": "./dist/drag.cjs.js",

@@ -124,13 +124,22 @@ import { DragOptions, Client, Position, OnDrag } from "./types";

if (!this.flag && checkInput) {
if (!this.flag) {
const activeElement = document.activeElement as HTMLElement;
const target = e.target as HTMLElement;
const tagName = target.tagName.toLowerCase();
const hasInput = INPUT_TAGNAMES.indexOf(tagName) > -1;
const hasContentEditable = target.isContentEditable;
if (
(INPUT_TAGNAMES.indexOf(tagName) > -1 && activeElement === target)
|| (activeElement && target.isContentEditable && activeElement.isContentEditable
&& (activeElement === target || activeElement.contains(target)))
) {
return false;
if (hasInput || hasContentEditable) {
if (checkInput || activeElement === target) {
// force false or already focused.
return false;
}
if (
activeElement
&& hasContentEditable
&& activeElement.isContentEditable
&& activeElement.contains(target)
) {
return false;
}
}

@@ -137,0 +146,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc