- From: sb3nder via GitHub <noreply@w3.org>
- Date: Sun, 21 Dec 2025 18:34:29 +0000
- To: public-pointer-events@w3.org
sb3nder has just created a new issue for https://github.com/w3c/pointerevents:
== Clarify touch/pen click target ==
I tested [this page](https://codepen.io/sb3nder/pen/raeEEpq) in Chrome (mouse, touch, pen, touch Android) and Firefox (mouse, touch, touch Android).
From the test results, it looks like the `click` target is calculated by re‑running hit‑testing instead of following the [4.2.12.3 Event dispatch](https://w3c.github.io/pointerevents/#event-dispatch) algorithm.
# Test results
* mutation target: `<button>`
* `pointerdown` target: `<button>`
## Structure 1 - pointer-capture: release
```
body
└─ button
```
### Mutation on **pointerup**
* `pointerup` target: `<button>`
| mutation | click (mouse) | click (touch / pen) | click (expected) |
| --- | --- | --- | --- |
| remove node | none | `<body>` | none |
| `display: none` | `<button>` | `<body>` | `<button>` |
| `pointer-events: none` | `<button>` | `<body>` | `<button>` |
### Mutation on **pointerdown**
| mutation | pointerup | click (mouse) | click (touch / pen) | click (expected) |
| --- | --- | --- | --- | --- |
| remove node | `<body>` | none | `<body>` | ?`<body>` |
| `display: none` | `<body>` | `<body>` | `<body>` | `<body>` |
| `pointer-events: none` | `<body>` | `<body>` | `<body>` | `<body>` |
---
## Structure 1 - pointer-capture: capture
```
body
└─ button
```
### Mutation on **pointerup**
* `pointerup` target: `<button>`
| mutation | click (mouse) | click (touch / pen) | click (expected) |
| --- | --- | --- | --- |
| remove node | none | `<body>` | none |
| `display: none` | `<button>` | `<body>` | `<button>` |
| `pointer-events: none` | `<button>` | `<body>` | `<button>` |
### Mutation on **pointerdown**
| mutation | pointerup | click (mouse) | click (touch / pen) | click (expected) |
| --- | --- | --- | --- | --- |
| remove node | `<body>` | none | `<body>` | ?`<body>` |
| `display: none` | `<button>` | `<button>` | `<body>` | `<button>` |
| `pointer-events: none` | `<button>` | `<button>` | `<body>` | `<button>` |
---
## Structure 2 (Overlapping elements) - pointer-capture: release
```
body
└─ div
├─ span (below)
└─ button (on top)
```
### Mutation on **pointerup**
* `pointerup` target: `<button>`
| mutation | click (mouse) | click (touch / pen) | click (expected) |
| --- | --- | --- | --- |
| remove node | none | `<span>` | none |
| `display: none` | `<button>` | `<span>` | `<button>` |
| `pointer-events: none` | `<button>` | `<span>` | `<button>` |
### Mutation on **pointerdown**
| mutation | pointerup | click (mouse) | click (touch / pen) | click (expected) |
| --- | --- | --- | --- | --- |
| remove node | `<span>` | none | `<span>` | ?`<div>` |
| `display: none` | `<span>` | `<div>` | `<span>` | `<div>` |
| `pointer-events: none` | `<span>` | `<div>` | `<span>` | `<div>` |
---
## Structure 2 (Overlapping elements) - pointer-capture: capture
```
body
└─ div
├─ span (below)
└─ button (on top)
```
### Mutation on **pointerup**
* `pointerup` target: `<button>`
| mutation | click (mouse) | click (touch / pen) | click (expected) |
| --- | --- | --- | --- |
| remove node | none | `<span>` | none |
| `display: none` | `<button>` | `<span>` | `<button>` |
| `pointer-events: none` | `<button>` | `<span>` | `<button>` |
### Mutation on **pointerdown**
| mutation | pointerup | click (mouse) | click (touch / pen) | click (expected) |
| --- | --- | --- | --- | --- |
| remove node | `<span>` | none, `<div>` Firefox | `<span>` | ?`<div>` |
| `display: none` | `<button>` | `<button>` | `<span>` | `<button>` |
| `pointer-events: none` | `<button>` | `<button>` | `<span>` | `<button>` |
Please view or discuss this issue at https://github.com/w3c/pointerevents/issues/563 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Sunday, 21 December 2025 18:34:30 UTC