manpages.ubuntu.com has broken layout when browsing with iPhone browser

Bug #517900 reported by Tomas Cassidy on 2010-02-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Manpage Repository
Low
Unassigned

Bug Description

When browsing the manpage for jp2a on the iPhone web browser, the page layout is broken. Screenshots are attached which show the broken layout.

Tomas Cassidy (tomas-cassidy) wrote :
Tomas Cassidy (tomas-cassidy) wrote :
Joseph Judistira (jjdstr) wrote :

This should affect all common browsers. It happens whenever the headers in the floating TOC are wide enough to overflow on top of the main text (because the screen is just too narrow).

Dustin Kirkland  (kirkland) wrote :

Okay, I think I can add some logic that would only allow the ToC to display if the windows width is greater than, say 640 pixels.

Changed in ubuntu-manpage-repository:
status: New → Triaged
importance: Undecided → Low
Dustin Kirkland  (kirkland) wrote :

Fix committed.

ToC will only display if browser width is >= 790 pixels.

Dustin Kirkland  (kirkland) wrote :

Committed revision 167.

Changed in ubuntu-manpage-repository:
status: Triaged → Fix Committed
Changed in ubuntu-manpage-repository:
status: Fix Committed → Fix Released
Tomas Cassidy (tomas-cassidy) wrote :

I can still see the problem occurring when browsing the manpage for jp2a on the iPhone web browser.

What's the resolution of the iphone browser?

I added some javascript that should only display the table of contents
if the browser is wider than 790 pixels.

Can you tell me if this javascript works correctly in the iPhone browser:

function getWidth() {
        width = 0;
        if (parseInt(navigator.appVersion)>3) {
                if (navigator.appName=="Netscape") {
                        width = window.innerWidth;
                } else if (navigator.appName.indexOf("Microsoft")!=-1) {
                        width = document.body.offsetWidth;
                }
        }
        return width;
}

Tomas Cassidy (tomas-cassidy) wrote :

Running that code in the iphone browser in portrait mode it returns "320". In landscape mode it returns "981". Running the code in Opera 10.52 on the desktop (WinXP) it returns "0". The iphone can possibly be fixed by setting some "viewport" meta-tag settings, but would have to be tested directly against an iphone to ensure compatibility.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers