When doing a left click, the moment when the mouse button released is the one that should count. At the moment, this is true for the time UI actions are executed, but not for the click location. If you click somewhere, drag the mouse over another UI element and release it, it will execute the first element. I feel it should execute the second element instead so it becomes possible to correct yourself if you misclick, or at the very least cancel the action.
I was also going to suggest left-click then right-click without releasing to cancel actions, but it seems this is already implemented (though I have not checked everywhere).
I've posted this to the feature request tracker, but if others feel differently about this issue, feel free to chime in.