Closed qjac closed 2 years ago
The solution for this was to replace the addEventListener to use the 'toggle' event type instead of the click behavior to update the status of the buttons. Here is the link about the 'toggle' event type https://developer.mozilla.org/en-US/docs/Web/API/HTMLDetailsElement/toggle_event
Collapse all seems to stick sometimes when a detail is manually opened.
Tested in chrome and firefox. If I manually expand sections, the 'collapse all' continues to have a strikethru and does not close the open drawers when pressed.
The reverse is also an issue. If I press expand all, but then close some manually, 'expand all' stays disabled.
Screenshot of the disabled 'close all' button and an open details pane. And the reverse.