leave afterRender alone on base popover and switch to event for easier extension
correct offset when popover is near edge of screen