add global click outside handler.
Merge remote-tracking branch 'origin/master'