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.
The refactor to usePress to remove the custom hit testing (#7427) broke S2's press scaling on menu triggers because menus open on mouse down, and when the underlay appears it covers the trigger button and the browser fires pointerleave immediately. This issue is unique to S2 because RAC already overrides
isPressed
on the trigger button to true, but in S2 we disabled that so that the press scaling doesn't get "stuck" while the menu is open. Now we can listen for pointerup on the document in onPressStart in S2 ourselves, and it should only remain scaled while the mouse is down.One slight difference vs before is that if you mouse down on the button and drag away it remains in the scaled state instead of removing it like our other buttons. Is this ok or should we add more logic to handle that?