Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@atlaskit/drag-and-drop

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atlaskit/drag-and-drop - npm Package Compare versions

Comparing version 0.14.0 to 0.15.0

6

CHANGELOG.md
# @atlaskit/drag-and-drop
## 0.15.0
### Minor Changes
- [`ed028658f13`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ed028658f13) - Minor internal refactor and adding additional tests
## 0.14.0

@@ -4,0 +10,0 @@

20

dist/cjs/util/fix-post-drag-pointer-bug.js

@@ -26,14 +26,8 @@ "use strict";

/**
* Allow the user to continue to interact with what their cursor is over at the end of the drag.
* Allow the user to continue to interact with the element their pointer is over at the end of the drag.
* This is important to allow the user to be able to click, drag (etc) after they have finished a drag
*
* @description
*
* 1. Allow pointer events on the element under the users pointer
* 2. Block pointer events for all children
* This is done as the element under the users pointer might
* contain elements that will incorrectly get browser selection
*
* @returns a `cleanup` function to restore all elements under the users pointer to their original state
*/
function fixUnderPointer(_ref2) {
function allowPointerEventsOnElementUnderPointer(_ref2) {
var current = _ref2.current;

@@ -86,7 +80,9 @@ var underUsersPointer = document.elementFromPoint(current.input.clientX, current.input.clientY);

queueMicrotask(function () {
// Applying fix to element under the pointer before disabling pointer events everywhere,
// Otherwise `element.elementFromPoint` would return `<html>` (document.documentElement)
var undoUnderPointer = fixUnderPointer({
var undoUnderPointer = allowPointerEventsOnElementUnderPointer({
current: current
});
// This will also block pointer-events on the children of the element under the users pointer.
// This is what we want. If the user drops on a container element we don't want the children
// of the container to be incorrectly entered into
var undoGlobalBlock = blockPointerEventsOnEverything();

@@ -93,0 +89,0 @@ function cleanup() {

2

dist/cjs/version.json
{
"name": "@atlaskit/drag-and-drop",
"version": "0.14.0",
"version": "0.15.0",
"sideEffects": false
}

@@ -20,14 +20,8 @@ import { bindAll } from 'bind-event-listener';

/**
* Allow the user to continue to interact with what their cursor is over at the end of the drag.
* Allow the user to continue to interact with the element their pointer is over at the end of the drag.
* This is important to allow the user to be able to click, drag (etc) after they have finished a drag
*
* @description
*
* 1. Allow pointer events on the element under the users pointer
* 2. Block pointer events for all children
* This is done as the element under the users pointer might
* contain elements that will incorrectly get browser selection
*
* @returns a `cleanup` function to restore all elements under the users pointer to their original state
*/
function fixUnderPointer({
function allowPointerEventsOnElementUnderPointer({
current

@@ -82,7 +76,9 @@ }) {

queueMicrotask(() => {
// Applying fix to element under the pointer before disabling pointer events everywhere,
// Otherwise `element.elementFromPoint` would return `<html>` (document.documentElement)
const undoUnderPointer = fixUnderPointer({
const undoUnderPointer = allowPointerEventsOnElementUnderPointer({
current
});
// This will also block pointer-events on the children of the element under the users pointer.
// This is what we want. If the user drops on a container element we don't want the children
// of the container to be incorrectly entered into
const undoGlobalBlock = blockPointerEventsOnEverything();

@@ -89,0 +85,0 @@ function cleanup() {

{
"name": "@atlaskit/drag-and-drop",
"version": "0.14.0",
"version": "0.15.0",
"sideEffects": false
}

@@ -20,14 +20,8 @@ import { bindAll } from 'bind-event-listener';

/**
* Allow the user to continue to interact with what their cursor is over at the end of the drag.
* Allow the user to continue to interact with the element their pointer is over at the end of the drag.
* This is important to allow the user to be able to click, drag (etc) after they have finished a drag
*
* @description
*
* 1. Allow pointer events on the element under the users pointer
* 2. Block pointer events for all children
* This is done as the element under the users pointer might
* contain elements that will incorrectly get browser selection
*
* @returns a `cleanup` function to restore all elements under the users pointer to their original state
*/
function fixUnderPointer(_ref2) {
function allowPointerEventsOnElementUnderPointer(_ref2) {
var current = _ref2.current;

@@ -80,7 +74,9 @@ var underUsersPointer = document.elementFromPoint(current.input.clientX, current.input.clientY);

queueMicrotask(function () {
// Applying fix to element under the pointer before disabling pointer events everywhere,
// Otherwise `element.elementFromPoint` would return `<html>` (document.documentElement)
var undoUnderPointer = fixUnderPointer({
var undoUnderPointer = allowPointerEventsOnElementUnderPointer({
current: current
});
// This will also block pointer-events on the children of the element under the users pointer.
// This is what we want. If the user drops on a container element we don't want the children
// of the container to be incorrectly entered into
var undoGlobalBlock = blockPointerEventsOnEverything();

@@ -87,0 +83,0 @@ function cleanup() {

{
"name": "@atlaskit/drag-and-drop",
"version": "0.14.0",
"version": "0.15.0",
"sideEffects": false
}
{
"name": "@atlaskit/drag-and-drop",
"version": "0.14.0",
"version": "0.15.0",
"description": "The core Atlassian drag and drop framework, optimized for performance.",

@@ -5,0 +5,0 @@ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",

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