Commit dcdecea
Fix event timestamp injection to check both casing variants
Summary:
UIManagerBinding::dispatchEvent checks for an existing timeStamp property before injecting one, but only checks the camelCase variant. Native events that use lowercase timestamp (e.g. pointer events) would have a duplicate timeStamp injected with the current time, which then takes precedence in the SyntheticEvent timestamp resolution chain (event.timeStamp || event.timestamp).
This adds a check for both timeStamp and timestamp before auto-injecting, preserving the original native event timestamp when present in either casing.
Root cause: #55878 only checked for timeStamp (camelCase).
Changelog: [General][Fixed] - Fix event timestamp injection overriding native timestamps with lowercase property name
Reviewed By: mdvacca
Differential Revision: D1015228711 parent 5620b1b commit dcdecea
1 file changed
Lines changed: 2 additions & 1 deletion
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
| 151 | + | |
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
| |||
0 commit comments