Use event capture phase for outside clicks