Fix viewport offset calculation in Firefox (issue #1322)
Merge pull request #1365 from joschka/fix-viewport-offset

Fix viewport offset calculation in Firefox (fixes issue #1322)