From a8d40c30c8ba570353ee3bf17f6177dfdec71d1e Mon Sep 17 00:00:00 2001 From: Mustaq Ahmed Date: Thu, 4 Jan 2024 14:05:43 -0500 Subject: [PATCH 01/11] Clarify text around low-level events behind click-like events. --- index.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 116e614..1ff198b 100644 --- a/index.html +++ b/index.html @@ -813,13 +813,12 @@

Event coordinates

Event dispatch

A click, auxclick or contextmenu event |e| MUST follow the dispatch process defined in [[UIEVENTS]] except when all of the following conditions are met:

When these conditions are met, event |e| MUST be dispatched to the capturing target of event |t|, and event |e| MUST be dispatched after the dispatch of the {{GlobalEventHandlers/lostpointercapture}} event with the same pointerId.

-
When |t| is a PointerEvent, its type depends on native platform convention: if |e| is a contextmenu event, |t| is either a {{GlobalEventHandlers/pointerdown}} or a {{GlobalEventHandlers/pointerup}} event; if |e| is a click or auxclick event, |t| is a {{GlobalEventHandlers/pointerup}} event.
+
When |e| is a click or auxclick event, |t| is always a {{GlobalEventHandlers/pointerup}} event. When |e| is a contextmenu event, |t| is either a {{GlobalEventHandlers/pointerdown}} or a {{GlobalEventHandlers/pointerup}} event, depending on native platform convention.
From 1d3ef8f0493bb13cd54e1874a0b1f9e268d8c1dc Mon Sep 17 00:00:00 2001 From: Mustaq Ahmed Date: Thu, 4 Jan 2024 16:43:02 -0500 Subject: [PATCH 02/11] Rewrite Sec 4.2.12.3. --- index.html | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index 1ff198b..df6a756 100644 --- a/index.html +++ b/index.html @@ -811,14 +811,22 @@

Event coordinates

Event dispatch

-

A click, auxclick or contextmenu event |e| MUST follow the dispatch process defined in [[UIEVENTS]] except when all of the following conditions are met:

-
    -
  • event |e| is fired in response to a user interaction event |t| which is a PointerEvent,
  • -
  • event |t| was dispatched while the corresponding pointer was captured, and
  • -
  • the capturing target of event |t| is [=connected=] [[DOM]] at the moment event |e| is being dispatched.
  • -
-

When these conditions are met, event |e| MUST be dispatched to the capturing target of event |t|, and event |e| MUST be dispatched after the dispatch of the {{GlobalEventHandlers/lostpointercapture}} event with the same pointerId.

-
When |e| is a click or auxclick event, |t| is always a {{GlobalEventHandlers/pointerup}} event. When |e| is a contextmenu event, |t| is either a {{GlobalEventHandlers/pointerdown}} or a {{GlobalEventHandlers/pointerup}} event, depending on native platform convention.
+

A click, auxclick or contextmenu event |e| MUST follow the dispatch process defined in the [[UIEVENTS]] spec except for the overrides defined in the algorithm below:

+
    +
  1. Let |t| be the user interaction event that caused the firing of |e|.
  2. +
    +

    Event |t| could be a non-PointerEvent; for example, it is a KeyboardEvent when a click event dispatch is caused by hitting the spacebar on a checkbox element.

    +

    When |t| is a PointerEvent, |t| is a {{GlobalEventHandlers/pointerup}} except for a contextmenu event where |t| is either a {{GlobalEventHandlers/pointerdown}} or a {{GlobalEventHandlers/pointerup}} event depending on native platform convention.

    +
    + +
  3. If |t| is not a PointerEvent, the dispatch of |e| MUST follow the [[UIEVENTS]] spec.
  4. + +
  5. Otherwise, if |t| was dispatched while the corresponding pointer was captured, and the capturing target of event |t| is [=connected=] [[DOM]] at the moment event |e| is being dispatched, then the target of |e| MUST be the capturing target of event |t|, and |e| MUST be dispatched after the dispatch of the {{GlobalEventHandlers/lostpointercapture}} event with the same pointerId.
  6. + +
  7. Otherwise, if |e| is a contextmenu event, the target of |e| MUST be the target of |t|.
  8. + +
  9. Otherwise (|e| is a click or auxclick event): let |td| and |tu| be the targets of the corresponding pointerdown and pointerup events respectively. If both |td| and |tu| are [=connected=] [[DOM]] at the moment event |e| is being dispatched, the target of |e| MUST be the nearest common inclusive ancestor of |td| and |tu| in the DOM; otherwise, |e| is not disaptched at all.
  10. +
From 4c4ad8fa6395d820576b870a8e7ee4ce0187dafc Mon Sep 17 00:00:00 2001 From: Mustaq Ahmed Date: Thu, 4 Jan 2024 16:51:51 -0500 Subject: [PATCH 03/11] Typo in tag --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index df6a756..1d1e391 100644 --- a/index.html +++ b/index.html @@ -815,7 +815,7 @@

Event dispatch

  1. Let |t| be the user interaction event that caused the firing of |e|.
  2. -

    Event |t| could be a non-PointerEvent; for example, it is a KeyboardEvent when a click event dispatch is caused by hitting the spacebar on a checkbox element.

    +

    Event |t| could be a non-PointerEvent; for example, it is a KeyboardEvent when a click event dispatch is caused by hitting the spacebar on a checkbox element.

    When |t| is a PointerEvent, |t| is a {{GlobalEventHandlers/pointerup}} except for a contextmenu event where |t| is either a {{GlobalEventHandlers/pointerdown}} or a {{GlobalEventHandlers/pointerup}} event depending on native platform convention.

    From 2bcb141371559ce0f9ac9ec64dd948cfdead0a46 Mon Sep 17 00:00:00 2001 From: "Patrick H. Lauke" Date: Wed, 17 Jan 2024 15:48:29 +0000 Subject: [PATCH 04/11] Update index.html --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 1d1e391..be44414 100644 --- a/index.html +++ b/index.html @@ -825,7 +825,7 @@

    Event dispatch

  3. Otherwise, if |e| is a contextmenu event, the target of |e| MUST be the target of |t|.
  4. -
  5. Otherwise (|e| is a click or auxclick event): let |td| and |tu| be the targets of the corresponding pointerdown and pointerup events respectively. If both |td| and |tu| are [=connected=] [[DOM]] at the moment event |e| is being dispatched, the target of |e| MUST be the nearest common inclusive ancestor of |td| and |tu| in the DOM; otherwise, |e| is not disaptched at all.
  6. +
  7. Otherwise (|e| is a click or auxclick event): let |td| and |tu| be the targets of the corresponding pointerdown and pointerup events respectively. If both |td| and |tu| are [=connected=] [[DOM]] at the moment event |e| is being dispatched, the target of |e| MUST be the nearest common inclusive ancestor of |td| and |tu| in the DOM; otherwise, |e| is not dispatched at all.
From c156f3db60ebb0d14ac94b78dde7d7380a36d380 Mon Sep 17 00:00:00 2001 From: Mustaq Ahmed Date: Wed, 17 Jan 2024 12:02:46 -0500 Subject: [PATCH 05/11] Fix nesting of a note within a list item. --- index.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index be44414..0575a72 100644 --- a/index.html +++ b/index.html @@ -813,11 +813,13 @@

Event coordinates

Event dispatch

A click, auxclick or contextmenu event |e| MUST follow the dispatch process defined in the [[UIEVENTS]] spec except for the overrides defined in the algorithm below:

    -
  1. Let |t| be the user interaction event that caused the firing of |e|.
  2. -
    -

    Event |t| could be a non-PointerEvent; for example, it is a KeyboardEvent when a click event dispatch is caused by hitting the spacebar on a checkbox element.

    -

    When |t| is a PointerEvent, |t| is a {{GlobalEventHandlers/pointerup}} except for a contextmenu event where |t| is either a {{GlobalEventHandlers/pointerdown}} or a {{GlobalEventHandlers/pointerup}} event depending on native platform convention.

    -
    +
  3. +

    Let |t| be the user interaction event that caused the firing of |e|.

    +
    +

    Event |t| could be a non-PointerEvent; for example, it is a KeyboardEvent when a click event dispatch is caused by hitting the spacebar on a checkbox element.

    +

    When |t| is a PointerEvent, |t| is a {{GlobalEventHandlers/pointerup}} except for a contextmenu event where |t| is either a {{GlobalEventHandlers/pointerdown}} or a {{GlobalEventHandlers/pointerup}} event depending on native platform convention.

    +
    +
  4. If |t| is not a PointerEvent, the dispatch of |e| MUST follow the [[UIEVENTS]] spec.
  5. From e9f1c6a73bee4c2109e0b97739c0d185c1ec4fc0 Mon Sep 17 00:00:00 2001 From: Mustaq Ahmed Date: Wed, 17 Jan 2024 14:44:11 -0500 Subject: [PATCH 06/11] Simplify common ancestor line. --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 0575a72..5ae8edf 100644 --- a/index.html +++ b/index.html @@ -827,7 +827,7 @@

    Event dispatch

  6. Otherwise, if |e| is a contextmenu event, the target of |e| MUST be the target of |t|.
  7. -
  8. Otherwise (|e| is a click or auxclick event): let |td| and |tu| be the targets of the corresponding pointerdown and pointerup events respectively. If both |td| and |tu| are [=connected=] [[DOM]] at the moment event |e| is being dispatched, the target of |e| MUST be the nearest common inclusive ancestor of |td| and |tu| in the DOM; otherwise, |e| is not dispatched at all.
  9. +
  10. Otherwise (|e| is a click or auxclick event): let |td| and |tu| be the targets of the corresponding pointerdown and pointerup events respectively. The target of |e| MUST be the nearest common inclusive ancestor of |td| and |tu| in the DOM at the moment event |e| is being dispatched; if there is no such ancestor, |e| is not dispatched at all.
From 92db184477a69b07eaf26fafd184c730819b621f Mon Sep 17 00:00:00 2001 From: Mustaq Ahmed Date: Wed, 17 Jan 2024 16:49:31 -0500 Subject: [PATCH 07/11] Rewrite click-like dispatch target steps. --- index.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 5ae8edf..37bc869 100644 --- a/index.html +++ b/index.html @@ -814,20 +814,20 @@

Event dispatch

A click, auxclick or contextmenu event |e| MUST follow the dispatch process defined in the [[UIEVENTS]] spec except for the overrides defined in the algorithm below:

  1. -

    Let |t| be the user interaction event that caused the firing of |e|.

    +

    Let |u| be the user interaction event that caused the firing of |e|.

    -

    Event |t| could be a non-PointerEvent; for example, it is a KeyboardEvent when a click event dispatch is caused by hitting the spacebar on a checkbox element.

    -

    When |t| is a PointerEvent, |t| is a {{GlobalEventHandlers/pointerup}} except for a contextmenu event where |t| is either a {{GlobalEventHandlers/pointerdown}} or a {{GlobalEventHandlers/pointerup}} event depending on native platform convention.

    +

    Event |u| could be a non-PointerEvent; for example, it is a KeyboardEvent when a click event dispatch is caused by hitting the spacebar on a checkbox element.

    +

    When |u| is a PointerEvent, |u| is a {{GlobalEventHandlers/pointerup}} except for a contextmenu event where |u| is either a {{GlobalEventHandlers/pointerdown}} or a {{GlobalEventHandlers/pointerup}} event depending on native platform convention.

  2. -
  3. If |t| is not a PointerEvent, the dispatch of |e| MUST follow the [[UIEVENTS]] spec.
  4. +
  5. If |u| is not a PointerEvent, the dispatch of |e| MUST follow the [[UIEVENTS]] spec (the remaining steps below are skipped).
  6. -
  7. Otherwise, if |t| was dispatched while the corresponding pointer was captured, and the capturing target of event |t| is [=connected=] [[DOM]] at the moment event |e| is being dispatched, then the target of |e| MUST be the capturing target of event |t|, and |e| MUST be dispatched after the dispatch of the {{GlobalEventHandlers/lostpointercapture}} event with the same pointerId.
  8. +
  9. If |e| is a contextmenu event, or |u| was dispatched while the corresponding pointer was captured, then let |t| be the target of |u|.
  10. -
  11. Otherwise, if |e| is a contextmenu event, the target of |e| MUST be the target of |t|.
  12. +
  13. Otherwise (|e| is a click or auxclick event for which |u| is a pointerup event that was dispatched uncaptured) let |t| be the nearest common inclusive ancestor of the corresponding pointerdown and pointerup targets in the DOM at the moment event |e| is being dispatched.
  14. -
  15. Otherwise (|e| is a click or auxclick event): let |td| and |tu| be the targets of the corresponding pointerdown and pointerup events respectively. The target of |e| MUST be the nearest common inclusive ancestor of |td| and |tu| in the DOM at the moment event |e| is being dispatched; if there is no such ancestor, |e| is not dispatched at all.
  16. +
  17. Dispatch |e| to |t| following the [[UIEVENTS]] spec. If |u| was dispatched while the corresponding pointer was captured, |e| MUST be dispatched after the dispatch of the {{GlobalEventHandlers/lostpointercapture}} event with the same pointerId.
From c39983d96c2edb105c5377f4c07374a82ade29df Mon Sep 17 00:00:00 2001 From: Mustaq Ahmed Date: Wed, 17 Jan 2024 17:02:10 -0500 Subject: [PATCH 08/11] Update further. --- index.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 37bc869..efeeb41 100644 --- a/index.html +++ b/index.html @@ -821,11 +821,15 @@

Event dispatch

-
  • If |u| is not a PointerEvent, the dispatch of |e| MUST follow the [[UIEVENTS]] spec (the remaining steps below are skipped).
  • +
  • If |u| is not a PointerEvent, dispatch |e| following the [[UIEVENTS]] spec (the remaining steps below are skipped).
  • -
  • If |e| is a contextmenu event, or |u| was dispatched while the corresponding pointer was captured, then let |t| be the target of |u|.
  • +
  • +

    Define |t| as follows:

    + +

    If |e| is a contextmenu event, or |u| was dispatched while the corresponding pointer was captured, then let |t| be the target of |u|.

    -
  • Otherwise (|e| is a click or auxclick event for which |u| is a pointerup event that was dispatched uncaptured) let |t| be the nearest common inclusive ancestor of the corresponding pointerdown and pointerup targets in the DOM at the moment event |e| is being dispatched.
  • +

    Otherwise (|e| is a click or auxclick event for which |u| is a pointerup event that was dispatched uncaptured) let |t| be the nearest common inclusive ancestor of the corresponding pointerdown and pointerup targets in the DOM at the moment event |e| is being dispatched.

    +
  • Dispatch |e| to |t| following the [[UIEVENTS]] spec. If |u| was dispatched while the corresponding pointer was captured, |e| MUST be dispatched after the dispatch of the {{GlobalEventHandlers/lostpointercapture}} event with the same pointerId.
  • From c1b03cd20a008cfc96379b81f741f7ab95b166bd Mon Sep 17 00:00:00 2001 From: Mustaq Ahmed Date: Fri, 19 Jan 2024 15:22:41 -0500 Subject: [PATCH 09/11] Tweaks plus non-normative lostpointercapture order. --- index.html | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index efeeb41..e488e2a 100644 --- a/index.html +++ b/index.html @@ -811,27 +811,30 @@

    Event coordinates

    Event dispatch

    -

    A click, auxclick or contextmenu event |e| MUST follow the dispatch process defined in the [[UIEVENTS]] spec except for the overrides defined in the algorithm below:

    +

    A click, auxclick or contextmenu event |event| MUST follow the dispatch process defined in the [[UIEVENTS]] spec except that |event| target is overridden using the algorithm below:

    1. -

      Let |u| be the user interaction event that caused the firing of |e|.

      +

      Let |user event| be the user interaction event that caused the firing of |event|.

      -

      Event |u| could be a non-PointerEvent; for example, it is a KeyboardEvent when a click event dispatch is caused by hitting the spacebar on a checkbox element.

      -

      When |u| is a PointerEvent, |u| is a {{GlobalEventHandlers/pointerup}} except for a contextmenu event where |u| is either a {{GlobalEventHandlers/pointerdown}} or a {{GlobalEventHandlers/pointerup}} event depending on native platform convention.

      +

      Event |user event| could be a non-PointerEvent; for example, it is a KeyboardEvent when a click event dispatch is caused by hitting the spacebar on a checkbox element.

      +

      When |user event| is a PointerEvent, |user event| is a {{GlobalEventHandlers/pointerup}} for a click or auxclick event, and either a {{GlobalEventHandlers/pointerdown}} or a {{GlobalEventHandlers/pointerup}} event (depending on native platform convention) for a contextmenu event.

    2. -
    3. If |u| is not a PointerEvent, dispatch |e| following the [[UIEVENTS]] spec (the remaining steps below are skipped).
    4. +
    5. If |user event| is not a PointerEvent, dispatch |event| following the [[UIEVENTS]] spec without overriding |event| target and skip the remaining steps below.
    6. -

      Define |t| as follows:

      +

      Define |target| as follows:

      -

      If |e| is a contextmenu event, or |u| was dispatched while the corresponding pointer was captured, then let |t| be the target of |u|.

      +

      If |event| is a contextmenu event, or |user event| was dispatched while the corresponding pointer was captured, then let |target| be the target of |user event|.

      -

      Otherwise (|e| is a click or auxclick event for which |u| is a pointerup event that was dispatched uncaptured) let |t| be the nearest common inclusive ancestor of the corresponding pointerdown and pointerup targets in the DOM at the moment event |e| is being dispatched.

      +

      Otherwise (|event| is a click or auxclick event for which |user event| is a pointerup event that was dispatched uncaptured) let |target| be the nearest common inclusive ancestor of the corresponding pointerdown and pointerup targets in the DOM at the moment |event| is being dispatched.

    7. -
    8. Dispatch |e| to |t| following the [[UIEVENTS]] spec. If |u| was dispatched while the corresponding pointer was captured, |e| MUST be dispatched after the dispatch of the {{GlobalEventHandlers/lostpointercapture}} event with the same pointerId.
    9. +
    10. +

      Dispatch |event| to |target| following the [[UIEVENTS]] spec.

      +
      If |user event| was captured, |event| is dispatched to the capturing target of |user event| even though the {{GlobalEventHandlers/lostpointercapture}} event with the same pointerId has been dispatched already.
      +
    From 249a205a39dfa26234949b996dc7f7aa3439b2ee Mon Sep 17 00:00:00 2001 From: Mustaq Ahmed Date: Fri, 19 Jan 2024 16:20:39 -0500 Subject: [PATCH 10/11] user_event --- index.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index e488e2a..9e72749 100644 --- a/index.html +++ b/index.html @@ -811,29 +811,29 @@

    Event coordinates

    Event dispatch

    -

    A click, auxclick or contextmenu event |event| MUST follow the dispatch process defined in the [[UIEVENTS]] spec except that |event| target is overridden using the algorithm below:

    +

    A click, auxclick or contextmenu event MUST follow the dispatch process defined in the [[UIEVENTS]] spec except that the event target is overridden using the algorithm below:

    1. -

      Let |user event| be the user interaction event that caused the firing of |event|.

      +

      Let |event| be the click, auxclick or contextmenu event being dispatched, and |user_event| be the user interaction event that caused the firing of |event|.

      -

      Event |user event| could be a non-PointerEvent; for example, it is a KeyboardEvent when a click event dispatch is caused by hitting the spacebar on a checkbox element.

      -

      When |user event| is a PointerEvent, |user event| is a {{GlobalEventHandlers/pointerup}} for a click or auxclick event, and either a {{GlobalEventHandlers/pointerdown}} or a {{GlobalEventHandlers/pointerup}} event (depending on native platform convention) for a contextmenu event.

      +

      Event |user_event| could be a non-PointerEvent; for example, it is a KeyboardEvent when a click event dispatch is caused by hitting the spacebar on a checkbox element.

      +

      When |user_event| is a PointerEvent, |user_event| is a {{GlobalEventHandlers/pointerup}} for a click or auxclick event, and either a {{GlobalEventHandlers/pointerdown}} or a {{GlobalEventHandlers/pointerup}} event (depending on native platform convention) for a contextmenu event.

    2. -
    3. If |user event| is not a PointerEvent, dispatch |event| following the [[UIEVENTS]] spec without overriding |event| target and skip the remaining steps below.
    4. +
    5. If |user_event| is not a PointerEvent, dispatch |event| following the [[UIEVENTS]] spec without overriding |event| target and skip the remaining steps below.
    6. Define |target| as follows:

      -

      If |event| is a contextmenu event, or |user event| was dispatched while the corresponding pointer was captured, then let |target| be the target of |user event|.

      +

      If |event| is a contextmenu event, or |user_event| was dispatched while the corresponding pointer was captured, then let |target| be the target of |user_event|.

      -

      Otherwise (|event| is a click or auxclick event for which |user event| is a pointerup event that was dispatched uncaptured) let |target| be the nearest common inclusive ancestor of the corresponding pointerdown and pointerup targets in the DOM at the moment |event| is being dispatched.

      +

      Otherwise (|event| is a click or auxclick event for which |user_event| is a pointerup event that was dispatched uncaptured) let |target| be the nearest common inclusive ancestor of the corresponding pointerdown and pointerup targets in the DOM at the moment |event| is being dispatched.

    7. Dispatch |event| to |target| following the [[UIEVENTS]] spec.

      -
      If |user event| was captured, |event| is dispatched to the capturing target of |user event| even though the {{GlobalEventHandlers/lostpointercapture}} event with the same pointerId has been dispatched already.
      +
      If |user_event| was captured, |event| is dispatched to the capturing target of |user_event| even though the {{GlobalEventHandlers/lostpointercapture}} event with the same pointerId has been dispatched already.
    From 5b5016cf230c0b2b1f376f6d154fcbcbb31a51bc Mon Sep 17 00:00:00 2001 From: Mustaq Ahmed Date: Wed, 31 Jan 2024 11:57:45 -0500 Subject: [PATCH 11/11] userEvent --- index.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 9e72749..b323384 100644 --- a/index.html +++ b/index.html @@ -814,26 +814,26 @@

    Event dispatch

    A click, auxclick or contextmenu event MUST follow the dispatch process defined in the [[UIEVENTS]] spec except that the event target is overridden using the algorithm below:

    1. -

      Let |event| be the click, auxclick or contextmenu event being dispatched, and |user_event| be the user interaction event that caused the firing of |event|.

      +

      Let |event| be the click, auxclick or contextmenu event being dispatched, and |userEvent| be the user interaction event that caused the firing of |event|.

      -

      Event |user_event| could be a non-PointerEvent; for example, it is a KeyboardEvent when a click event dispatch is caused by hitting the spacebar on a checkbox element.

      -

      When |user_event| is a PointerEvent, |user_event| is a {{GlobalEventHandlers/pointerup}} for a click or auxclick event, and either a {{GlobalEventHandlers/pointerdown}} or a {{GlobalEventHandlers/pointerup}} event (depending on native platform convention) for a contextmenu event.

      +

      Event |userEvent| could be a non-PointerEvent; for example, it is a KeyboardEvent when a click event dispatch is caused by hitting the spacebar on a checkbox element.

      +

      When |userEvent| is a PointerEvent, |userEvent| is a {{GlobalEventHandlers/pointerup}} for a click or auxclick event, and either a {{GlobalEventHandlers/pointerdown}} or a {{GlobalEventHandlers/pointerup}} event (depending on native platform convention) for a contextmenu event.

    2. -
    3. If |user_event| is not a PointerEvent, dispatch |event| following the [[UIEVENTS]] spec without overriding |event| target and skip the remaining steps below.
    4. +
    5. If |userEvent| is not a PointerEvent, dispatch |event| following the [[UIEVENTS]] spec without overriding |event| target and skip the remaining steps below.
    6. Define |target| as follows:

      -

      If |event| is a contextmenu event, or |user_event| was dispatched while the corresponding pointer was captured, then let |target| be the target of |user_event|.

      +

      If |event| is a contextmenu event, or |userEvent| was dispatched while the corresponding pointer was captured, then let |target| be the target of |userEvent|.

      -

      Otherwise (|event| is a click or auxclick event for which |user_event| is a pointerup event that was dispatched uncaptured) let |target| be the nearest common inclusive ancestor of the corresponding pointerdown and pointerup targets in the DOM at the moment |event| is being dispatched.

      +

      Otherwise (|event| is a click or auxclick event for which |userEvent| is a pointerup event that was dispatched uncaptured) let |target| be the nearest common inclusive ancestor of the corresponding pointerdown and pointerup targets in the DOM at the moment |event| is being dispatched.

    7. Dispatch |event| to |target| following the [[UIEVENTS]] spec.

      -
      If |user_event| was captured, |event| is dispatched to the capturing target of |user_event| even though the {{GlobalEventHandlers/lostpointercapture}} event with the same pointerId has been dispatched already.
      +
      If |userEvent| was captured, |event| is dispatched to the capturing target of |userEvent| even though the {{GlobalEventHandlers/lostpointercapture}} event with the same pointerId has been dispatched already.