-
Notifications
You must be signed in to change notification settings - Fork 215
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
fix(menu): handle pointerup and click correctly #5187
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: ff0dd35 The changes in this PR will be included in the next version bump. This PR includes changesets to release 84 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Branch previewReview the following VRT differencesWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
If the changes are expected, update the |
Tachometer resultsCurrently, no packages are changed by this PR... |
Pull Request Test Coverage Report for Build 13832089803Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
@TarunAdobe can please you add testing instructions to the description? |
Yes yes!! This PR wasn't ready for review at the time. Im still fixing the broken tests :) |
245db06
to
12a58c0
Compare
12a58c0
to
7f73bfe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for this fix!
Revoking approval because this does not work for me on Chrome responsive https://ttomar-picker-modal--spectrumwc.netlify.app/storybook/?path=/story/picker--background-click-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wip
Description
Menu component was handling selection and firing the close/change events incorrectly. There was a race condition such that the pointerup event would close the menu on selection before the click event happening and so any element behind that menu-item would get that click event.
I had previously done a hacky fix for this issue in #5060 but that was incorrect. In that fix we stopped the propogation of all the events from the dialogEl.
This caused our picker to break and #5111 came into existence.
This PR fixes the new issue by updating the fix we did in #5060
Related issue(s)
Motivation and context
I had previously done a hacky fix for this issue in #5060 but that was incorrect. In that fix we stopped the propogation of all the events from the dialogEl.
This caused our picker to break and #5111 came into existence.
How has this been tested?
Test case 1
Test case 2
Did it pass in Desktop?
Did it pass in Mobile?
Did it pass in iPad?
Screenshots (if appropriate)
Types of changes
Checklist
Best practices
This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against
main
.