Ensure the viewport's contentWidth and contentHeight are set properly