Handle `collapsed` class on triggers even when manually invoked

Fixes #13636.
i kinda would like to see this in a method like this.getParent() to keep the constructor simple