Commit 68debb2
Fix event timestamp injection to check both casing variants (facebook#56495)
Summary:
Pull Request resolved: facebook#56495
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: facebook#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: D101522871
fbshipit-source-id: 74d91a3958ac73927251189f07f954303d45688e1 parent 5620b1b commit 68debb2
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