avoid spurious test failure due to window scroll
Viewport: changes to work better on mobile etc.
Also adding manual test case (hard to test via webdriver).
Refs #310.
Add "center" option to popup's orient parameter, to make a dialog.
Fixes #310.