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

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