Prerequisites
Ionic Framework Version
v7.x
Current Behavior
If I have a checkbox inside of an ion-accordion element, when the checkbox is checked the accordion also fires a change event - which in my case - closes the accordion.
Expected Behavior
Events inside the accordion content should not cause the accordion change event to fire.
Steps to Reproduce
- Add an ion-checkbox to the inside of the content of an ion-accordion
- Add an event listener to the accordion-group
- Check the box - notice the accordion group event fires
Workaround - add event.stopPropagation to the checkbox event listener
Code Reproduction URL
https://stackblitz.com/edit/g4jdvt?file=src%2Fmain.tsx
Ionic Info
N/A
Additional Information
#26771
The solution to this bug is for a checkbox inside the accordion header - so the fix makes sense. However, I would not expect an item inside the content to toggle the accordion closed.