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

Change useMenuTrigger onPressStart to state.open #6024

Merged

Conversation

subvertallchris
Copy link
Contributor

Closes #5988

✅ Pull Request Checklist:

📝 Test Instructions:

  1. Review the problem as described at Select menu closes unexpectedly while holding mouse button and cursor leaving then returning #5988
  2. Open Storybook and browse to MenuTrigger
  3. Try to replicate the bug as originally described

I tried to write a new test covering the original condition and failed. I don't have the fluency in react-aria to know how to simulate the behavior. A test did cover the basic behavior, though, and it was updated to reflect the use of open instead of toggle.

@subvertallchris
Copy link
Contributor Author

@LFDanLu thanks for the advice and recommendation!

My CLA is signed, FYI.

@LFDanLu
Copy link
Member

LFDanLu commented Mar 7, 2024

@subvertallchris Thanks for the speedy turnaround! I'll see if I can figure out a way to test this flow when I get some spare time

@subvertallchris
Copy link
Contributor Author

Happy to help! Do you think more tests are necessary prior to merge or is this mergeable as is now?

@LFDanLu
Copy link
Member

LFDanLu commented Mar 7, 2024

I'd prefer having a test that mimics the user flow of pointer down on the trigger button + move off the button + move back on the button and confirms that the open state doesn't change using a flow similar to this, but I personally wouldn't make it a hard requirement for this PR since it might be a bit tricky with the coordinate mocking. Definitely will try to get this into a general upcoming testing session this Monday to see if we can spot any cross browser/device edge cases.

@LFDanLu
Copy link
Member

LFDanLu commented Mar 8, 2024

GET_BUILD

@rspbot
Copy link

rspbot commented Mar 8, 2024

Copy link
Member

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

@reidbarber
Copy link
Member

GET_BUILD

@rspbot
Copy link

rspbot commented Mar 11, 2024

@rspbot
Copy link

rspbot commented Mar 11, 2024

## API Changes

unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any', access: 'private' }
unknown top level export { type: 'any', access: 'private' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'identifier', name: 'Column' }
unknown top level export { type: 'identifier', name: 'Column' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }
unknown top level export { type: 'any' }

Copy link
Member

@reidbarber reidbarber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

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.

Select menu closes unexpectedly while holding mouse button and cursor leaving then returning
5 participants