Do not toggle collapsed state on collapse clicked element if target is still animating

Fix for issue #6691

Not sure if the check for the target's height is "proper", but since for every collapse event, a new Collapse is created with its own (unshared) 'transitioning' state, which the click target doesn't have access to, this was the only thing I could think of for now.