This edge case is follow up work to T316033.
Steps to replicate the issue (include links if applicable):
- Load https://test.wikipedia.org/wiki/TOC_toggle_button
- Click arrow by section 5 to collapse it. DO NOT EXPAND IT.
- Click edit
- Publish changes
- Click section 5 toggle
What happens?:
Actual: Nothing. Clicking again collapses.
What should have happened instead?:
Expected: Collapses
Software version (skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):