Handle `collapsed` class on triggers even when manually invoked

Fixes #13636.
until we figure out some sort of better way to share the method (util, etc.)