Fix #58. Popup disappears beyond the date line if padding is used.