To the map? Are popups always use with/over maps?

Also this code sounds like a workaround for some ol3 issue. I think I'd remove this code and fix ol3.