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

fix: accordion item should not collapse on unrelated change events #6158

Merged
merged 6 commits into from
Jul 1, 2022

Conversation

scomea
Copy link
Collaborator

@scomea scomea commented Jun 26, 2022

Pull Request

📖 Description

Accordion was listening for change events to determine when to open/close items, but was not differentiating between change events generated by the accordion items and those of the children of these items. This change adds checks to ensure that accordion ignores change events from other elements and does not react to events that have been defaultPrevented,

🎫 Issues

closes #6144

📑 Test Plan

We should add some functional accordion tests when we move to playright. The current set is limited. Added an issue to track.
#6157

✅ Checklist

General

  • I have included a change request file using $ yarn change
  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

Component-specific

@ghost
Copy link

ghost commented Jun 26, 2022

CLA assistant check
All CLA requirements met.

@scomea scomea changed the title fix: accordion item should not collapse when a checkbox in an open fix: accordion item should not collapse on unrelated change events Jun 26, 2022
@scomea scomea force-pushed the users/scomea/accordion-change-event-handling branch from 7d4dc05 to e7ba0d0 Compare June 30, 2022 06:26
@chrisdholt chrisdholt merged commit 1d0a4a3 into master Jul 1, 2022
@chrisdholt chrisdholt deleted the users/scomea/accordion-change-event-handling branch July 1, 2022 06:25
chrisdholt pushed a commit that referenced this pull request Aug 29, 2022
chrisdholt pushed a commit that referenced this pull request Aug 29, 2022
chrisdholt added a commit that referenced this pull request Aug 29, 2022
…6158) (#6332)

* Change files

* prettier

* add tests

Co-authored-by: Stephane Comeau <scomea@microsoft.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.

fix: toggling a checkbox inside of an accordion item causes accordion item to collapse
3 participants