add click handler that dismisses active popover when clicking anywhere else; starting to figure out popover viewport bug