@dnd-kit/dom 0.5.1 → 0.5.2-beta-20261029020134

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/index.js CHANGED
@@ -2149,22 +2149,28 @@ var _PointerSensor = class _PointerSensor extends Sensor {
2149
2149
  controller.signal.onabort = () => this.handleCancel(event);
2150
2150
  controller.onEvent(event);
2151
2151
  this.controller = controller;
2152
+ const { pointerId } = event;
2153
+ const forPointer = (listener) => (event2) => {
2154
+ if (event2.pointerId === pointerId) {
2155
+ listener(event2);
2156
+ }
2157
+ };
2152
2158
  const documents = getDocuments();
2153
2159
  const unbindListeners = this.listeners.bind(documents, [
2154
2160
  {
2155
2161
  type: "pointermove",
2156
- listener: (event2) => this.handlePointerMove(event2, source)
2162
+ listener: forPointer((event2) => this.handlePointerMove(event2, source))
2157
2163
  },
2158
2164
  {
2159
2165
  type: "pointerup",
2160
- listener: this.handlePointerUp,
2166
+ listener: forPointer(this.handlePointerUp),
2161
2167
  options: {
2162
2168
  capture: true
2163
2169
  }
2164
2170
  },
2165
2171
  {
2166
2172
  type: "pointercancel",
2167
- listener: this.handleCancel
2173
+ listener: forPointer(this.handleCancel)
2168
2174
  },
2169
2175
  {
2170
2176
  // Cancel activation if there is a competing Drag and Drop interaction