Expected behaviour for “clicking outside cancels” would be if the cancel area would be more like below (and the cancel button, of course):