Events on collapsible: click, collapse, expand: which order are they triggered?

Events on collapsible: click, collapse, expand: which order are they triggered?

Hi all,
I have a collapsible div, whose header is divided in two parts.

The first one is the standard header text, the title of the collapsible.
The second one contains, for reasons that I can't control (it is required to be like that), an input type text.

I need to make the collapsible behave like this:
- if the first part of the header is clicked (the title text): standard behavior (expand/collapse)
- if the second part of the header is clicked (e.g.: focusing the input text): default behavior is prevented, so the collapsible neither expand or collapse.

Unfortunately the expand/collapse event does not carry any information about the clicked area, so cannot identify where the click comes from (the title or the input text).

The click event does, but strangely it seems to be triggered AFTER the expand/collapse.
Obviously I imagine that virtual events like collapse/expand are triggered by jquery mobile on an event handler attached to the click event. So how can this be possible?

Thank you