Commit 74382ca
Register Android pointer capture events (#57176)
Summary:
The `PointerEventsProcessor` C++ pointer-events implementation already supports pointer capture and can emit `topGotPointerCapture` and `topLostPointerCapture`. `TouchEventEmitter` has handlers for both events.
Android base view config was not registering the events:
- `onGotPointerCapture` / `onGotPointerCaptureCapture`
- `onLostPointerCapture` / `onLostPointerCaptureCapture`
This adds the missing Android registrations and adds an EventDispatching integration test covering capture and bubble dispatch for both pointer capture events.
## Changelog:
[Android] [Fixed] - Register pointer capture event handlers in the Android base view config
Pull Request resolved: #57176
Test Plan:
Added coverage in `EventDispatching-itest.js` for `onGotPointerCapture`, `onGotPointerCaptureCapture`, `onLostPointerCapture`, and `onLostPointerCaptureCapture`.
`git diff --check main...HEAD`
Reviewed By: cortinico
Differential Revision: D108321784
Pulled By: Abbondanzo
fbshipit-source-id: ce5c6d369dae15030062457d2857ae501e02e2241 parent cb0e55f commit 74382ca
2 files changed
Lines changed: 68 additions & 0 deletions
File tree
- packages/react-native
- Libraries/NativeComponent
- src/private/renderer/core/__tests__
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
115 | 127 | | |
116 | 128 | | |
117 | 129 | | |
| |||
424 | 436 | | |
425 | 437 | | |
426 | 438 | | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
427 | 443 | | |
428 | 444 | | |
429 | 445 | | |
| |||
Lines changed: 52 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
160 | 212 | | |
161 | 213 | | |
162 | 214 | | |
| |||
0 commit comments