@jsenv/dom 0.17.83 → 0.17.84

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.
Files changed (2) hide show
  1. package/dist/jsenv_dom.js +16 -15
  2. package/package.json +1 -1
package/dist/jsenv_dom.js CHANGED
@@ -4611,19 +4611,20 @@ const waitForPressHeld = (
4611
4611
  ) => {
4612
4612
  const { pointerId, clientX, clientY } = pressEvent;
4613
4613
 
4614
- /* The one capture that says nothing about the press. A pointer that cannot
4615
- hover is given a capture the moment it lands, by the browser and to the
4616
- element it landed on, without anybody asking — and it is announced like any
4617
- other, just before the first pointer event that follows. EVERY touch press
4618
- has it, so it cannot be read as this one having been settled: read that way,
4619
- the wait dies at the first pixel of a finger that was only resting on the
4620
- glass, which is what a finger does. That is the hold that fails one time in
4621
- two, on the pointer this whole module exists for.
4622
- Asked rather than assumed, and asked HERE: the press is the one moment where
4623
- a capture can only be the browser's, since nothing has taken one yet. */
4624
- const implicitCaptureHolder = pressEvent.target.hasPointerCapture?.(pointerId)
4625
- ? pressEvent.target
4626
- : null;
4614
+ /* The one capture that says nothing about the press. A finger is given a
4615
+ capture the moment it lands, by the browser and to the element it landed
4616
+ on, without anybody asking — and it is announced like any other, just
4617
+ before the first pointer event that follows. EVERY touch press has it, so it
4618
+ cannot be read as this one having been settled: read that way, the wait
4619
+ dies at the first pixel of a finger that was only resting on the glass,
4620
+ which is what a finger does. A mouse or a pen is given none.
4621
+ Known from the press, never asked with hasPointerCapture: the capture goes
4622
+ to the deepest element under the finger, and inside a shadow tree (the
4623
+ inner editor of every <input> and <textarea>, any web component) the
4624
+ element the page sees answers false, while the announcement reaches the
4625
+ page retargeted to it. */
4626
+ const implicitCaptureHolder =
4627
+ pressEvent.pointerType === "touch" ? pressEvent.target : null;
4627
4628
 
4628
4629
  const pressCleanupCallbacks = [];
4629
4630
  // Who is still holding the refusal. The finger holds it because the finger is
@@ -4750,8 +4751,8 @@ const waitForPressHeld = (
4750
4751
  }
4751
4752
  holdGiveUps.add(cancelPress);
4752
4753
  // A gesture that captures the pointer without takePress: heard only when the
4753
- // capture moves, the one it takes on the implicit holder being announced to
4754
- // nobody (see takePress).
4754
+ // capture moves, the one it takes on the implicit holder being
4755
+ // indistinguishable from the browser's (see takePress).
4755
4756
  const onGotPointerCapture = (captureEvent) => {
4756
4757
  if (captureEvent.pointerId !== pointerId) {
4757
4758
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/dom",
3
- "version": "0.17.83",
3
+ "version": "0.17.84",
4
4
  "type": "module",
5
5
  "description": "DOM utilities for writing frontend code",
6
6
  "repository": {