chore(compass-components): Update react-aria; Make sure onFocus / onBlur always makes it to the component COMPASS-5917 #3206
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After spending way too much time debugging this latest issue that Cloud ran into while updating our packages to latest in their codebase we finally pinpointed it to the difference in the react-aria dependency versions. There was a subtle change in the package behavior that unfortunately started to cause issues in the
<Document />
component. We were not affected yet because package-lock guarded us from encountering this, but as it's affecting Cloud and we would need to update eventually it made sense to me to update and address the issue right away.So the root cause was that instead of
triggerProps
having noonFocus
andonBlur
properties at all, react-aria started to explicitly pass these properties asundefined
in some cases which caused the spreading to override ouronFocus
andonBlur
callbacks that we were passing to the component. This in turn meant thateditor.start
/stop
was not called on the hadron doc anymore leading to the same issue we fixed in #2942This patch makes sure that we are merging trigger props in a way that always makes sure that our event callbacks will get passed to the component. There are no new tests added in this PR because it was already covered by existing ones and updating the deps without adding the fix was catching it (also
chore
and notfix
because nothing is really broken in Compass)COMPASS-5917