Commit 9b8f83c
authored
fix: Keep Android CSS :hover active while the pointer is over descendant views (#9718)
## Summary
Android `:hover` toggled only the view that received the event, so
moving the pointer onto a hoverable descendant fired `ACTION_HOVER_EXIT`
on the ancestor and cleared its `:hover`. It's now recomputed from the
pointer position on enter/exit, so an ancestor stays hovered while the
pointer is over a descendant (matching `:active`). Also removes
`elevation: 2` from the Showcase action buttons, which Android drew as
an opaque white rectangle inside the rounded border.
| Before | After |
|-|-|
| <video
src="https://github.com/user-attachments/assets/bf11b5fa-fbee-46a3-b167-18f04e4ade54"
/> | <video
src="https://github.com/user-attachments/assets/910a6ef5-1f1c-4a3a-9b8e-92be702f7ea7"
/> |
## Test plan
Verified on a physical Samsung S26 Ultra using its S-pen.1 parent 9551383 commit 9b8f83c
2 files changed
Lines changed: 49 additions & 7 deletions
File tree
- apps/common-app/src/apps/css/examples/transitions/screens/pseudoSelectors
- packages/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/pseudoSelectors
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
159 | 158 | | |
160 | 159 | | |
161 | 160 | | |
| |||
Lines changed: 49 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
20 | 27 | | |
21 | 28 | | |
22 | 29 | | |
| |||
84 | 91 | | |
85 | 92 | | |
86 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
87 | 98 | | |
88 | 99 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
94 | 104 | | |
95 | 105 | | |
96 | 106 | | |
97 | 107 | | |
98 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
99 | 116 | | |
100 | 117 | | |
101 | 118 | | |
| |||
200 | 217 | | |
201 | 218 | | |
202 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
203 | 246 | | |
204 | 247 | | |
205 | 248 | | |
| |||
0 commit comments