Skip to content

Conversation

@Saadnajmi
Copy link
Contributor

@Saadnajmi Saadnajmi commented Nov 28, 2022

(Draft, still testing if this is the right solution)

Description

Remove some legacy code that unnecessarily overrides onBlur and onFocus in Pressable

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Why

As far as I can tell, we were unnecessarily overriding onFocus and onBlur in the desktop Pressable forks. This (may) have caused Pressable to fail shallow compare and re-render unnecessarily, affecting downstream components in FluentUI React Native. Those specific event handlers are already handled in Pressability.js and passed into Pressable via the {...eventHandlers} spread across React Native Core, windows, and macOS.

What

What changes were made to the codebase to solve the bug, add the functionality, etc. that you specified above.

Screenshots

Add any relevant screen captures here from before or after your changes.

Testing

If you added tests that prove your changes are effective or that your feature works, add a few sentences here detailing the added test scenarios.

Optional: Describe the tests that you ran locally to verify your changes.

Microsoft Reviewers: Open in CodeFlow

@Saadnajmi
Copy link
Contributor Author

Closing in favor of #10942 which is a branch off my fork

@Saadnajmi Saadnajmi closed this Nov 29, 2022
@Saadnajmi Saadnajmi deleted the Saadnajmi-patch-1 branch November 29, 2022 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants