motion-dom 12.32.0 → 12.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js
CHANGED
|
@@ -4415,6 +4415,7 @@ const enableKeyboardPress = (focusEvent, eventOptions) => {
|
|
|
4415
4415
|
function isValidPressEvent(event) {
|
|
4416
4416
|
return isPrimaryPointer(event) && !isDragActive();
|
|
4417
4417
|
}
|
|
4418
|
+
const claimedPointerDownEvents = new WeakSet();
|
|
4418
4419
|
/**
|
|
4419
4420
|
* Create a press gesture.
|
|
4420
4421
|
*
|
|
@@ -4440,7 +4441,12 @@ function press(targetOrSelector, onPressStart, options = {}) {
|
|
|
4440
4441
|
const target = startEvent.currentTarget;
|
|
4441
4442
|
if (!isValidPressEvent(startEvent))
|
|
4442
4443
|
return;
|
|
4444
|
+
if (claimedPointerDownEvents.has(startEvent))
|
|
4445
|
+
return;
|
|
4443
4446
|
isPressing.add(target);
|
|
4447
|
+
if (options.stopPropagation) {
|
|
4448
|
+
claimedPointerDownEvents.add(startEvent);
|
|
4449
|
+
}
|
|
4444
4450
|
const onPressEnd = onPressStart(target, startEvent);
|
|
4445
4451
|
const onPointerEnd = (endEvent, success) => {
|
|
4446
4452
|
window.removeEventListener("pointerup", onPointerUp);
|