When clicking on the borders of the toggle icon, the click is not registered, even though a cursor pointer is shown.
This is due to adding the click event listener to the icon and not the icon wrapper:
|
expandIcon.addEventListener("click", () => toggleExpand()) |
The fix is simple: put the click event listener on the icon wrapper instead.