Handle `collapsed` class on triggers even when manually invoked

Fixes #13636.
Yeah, that sounds like something for v4.