Gear button disappears when click outside post