Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't send events when clicking on scrollbars #1281

Merged
merged 1 commit into from
Jul 26, 2022

Conversation

christophpurrer
Copy link

Please select one of the following

  • I am removing an existing difference between facebook/react-native and microsoft/react-native-macos 👍
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos 👍
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native

Summary

This will ignore "touches" (clicks) on NSScroller such that JS does not process them resulting in a press event.

Changelog

[macOS] [Changed] - Don't send events when clicking on scrollbars

Test Plan

Confirmed clicking scrollbar in rn-tester does not result in a click on the items underneath.

Before

Both scrollView scroller and content clicks are processed

before.mov

After

Clicking onto the scrollView scroller > click is ignored
Clicking into the the scrollView > no change of behavior

after.mov

This will ignore "touches" (clicks) on `NSScroller` such that JS does not process them resulting in a press event.

Confirmed clicking scrollbar in rn-tester does not result in a click on the items underneath.
@Saadnajmi Saadnajmi merged commit d69fa5b into microsoft:main Jul 26, 2022
Saadnajmi pushed a commit to Saadnajmi/react-native-macos that referenced this pull request Jan 30, 2023
This will ignore "touches" (clicks) on `NSScroller` such that JS does not process them resulting in a press event.

Confirmed clicking scrollbar in rn-tester does not result in a click on the items underneath.

Co-authored-by: Scott Kyle <skyle@fb.com>
Saadnajmi added a commit that referenced this pull request Jan 30, 2023
This will ignore "touches" (clicks) on `NSScroller` such that JS does not process them resulting in a press event.

Confirmed clicking scrollbar in rn-tester does not result in a click on the items underneath.

Co-authored-by: Christoph Purrer <christophpurrer@outlook.com>
Co-authored-by: Scott Kyle <skyle@fb.com>
shwanton pushed a commit to shwanton/react-native-macos that referenced this pull request Feb 13, 2023
This will ignore "touches" (clicks) on `NSScroller` such that JS does not process them resulting in a press event.

Confirmed clicking scrollbar in rn-tester does not result in a click on the items underneath.

Co-authored-by: Scott Kyle <skyle@fb.com>
shwanton pushed a commit to shwanton/react-native-macos that referenced this pull request Mar 10, 2023
This will ignore "touches" (clicks) on `NSScroller` such that JS does not process them resulting in a press event.

Confirmed clicking scrollbar in rn-tester does not result in a click on the items underneath.

Co-authored-by: Scott Kyle <skyle@fb.com>
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.

3 participants