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

svelte-gestures

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-gestures - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

6

CHANGELOG.md
# Changelog
## 1.3.2
`press` gesture now preventDefault on contextmenu of its element and also adds `style.userSelect = 'none';`
Bug resolved for case when `swipe` gesture reported wrong directions if used on scrollable area.
## 1.3.1

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

8

dist/index.esm.js

@@ -181,2 +181,8 @@ const DEFAULT_DELAY = 300;

}) {
node.style.userSelect = 'none';
node.oncontextmenu = e => {
e.preventDefault();
};
const gestureName = 'press';

@@ -311,3 +317,3 @@ let startTime;

function onUp(activeEvents, event) {
if (activeEvents.length === 0 && Date.now() - startTime < parameters.timeframe) {
if (event.type === 'pointerup' && activeEvents.length === 0 && Date.now() - startTime < parameters.timeframe) {
const x = event.clientX - clientX;

@@ -314,0 +320,0 @@ const y = event.clientY - clientY;

@@ -185,2 +185,8 @@ 'use strict';

}) {
node.style.userSelect = 'none';
node.oncontextmenu = e => {
e.preventDefault();
};
const gestureName = 'press';

@@ -315,3 +321,3 @@ let startTime;

function onUp(activeEvents, event) {
if (activeEvents.length === 0 && Date.now() - startTime < parameters.timeframe) {
if (event.type === 'pointerup' && activeEvents.length === 0 && Date.now() - startTime < parameters.timeframe) {
const x = event.clientX - clientX;

@@ -318,0 +324,0 @@ const y = event.clientY - clientY;

2

package.json

@@ -6,3 +6,3 @@ {

"license": "MIT",
"version": "1.3.1",
"version": "1.3.2",
"main": "dist/index.js",

@@ -9,0 +9,0 @@ "module": "dist/index.esm.js",

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