Last modified: 2014-02-12 23:53:27 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T33214, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31214 - ipad apps - mobile article doesn't fit if webview width < 768
ipad apps - mobile article doesn't fit if webview width < 768
Status: RESOLVED FIXED
Product: MobileFrontend
Classification: Unclassified
stable (Other open bugs)
unspecified
Other other
: Normal major
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-28 15:30 UTC by Greg
Modified: 2014-02-12 23:53 UTC (History)
11 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
no problem a few weeks ago (36.46 KB, image/jpeg)
2011-09-28 15:30 UTC, Greg
Details
the text of the article is hidden on the right of the webview. (886.02 KB, image/png)
2011-09-28 15:35 UTC, Greg
Details

Description Greg 2011-09-28 15:30:59 UTC
Created attachment 9110 [details]
no problem a few weeks ago

The problem occures on iPad when
- a UIWebView is loading a mobile wikipedia article (such as  http://en.m.wikipedia.org/wiki/Paris) 
- if the width of the webview is less than 768px (ex : 500px)

The article doesn't fit within the width of the webview : the user has to scroll to see the "right" part of the article. It seems the min width of the webPage is set to 768px. This was not the case a few weeks ago.
(The problem doesn't occure on iPhone although its width is 320 px)

This makes the article a little painfull to read because the user has to scroll to read the end of each line.
This happens on iPad for example with this free app (but not on iPhone)
http://itunes.apple.com/fr/app/world-explorer/id381581095?mt=8

Please find attached 2 screenshots showing the behaviour a few weeks ago and now.

Thanks for your help !

regards

Greg
Comment 1 Greg 2011-09-28 15:35:19 UTC
Created attachment 9111 [details]
the text of the article is hidden on the right of the webview.

 the user has to scroll to read the content
Comment 2 Brion Vibber 2011-09-28 17:27:06 UTC
The HTML template contains a <meta> viewport specifying width=device-width, forcing initial scaling to 1.0, and disabling user rescaling. On iPad device-width would report 768px, which sounds like what you're seeing.

It looks like this last changed in r89940 in June, switching from semicolons to commas for the separation of the bits in there. If the old Ruby code was using the semicolons, maybe it wasn't kicking in quite the same before the switchover to the new code?

I'm not sure what's a feasible workaround for this; uncertain whether just dropping the 'width' would do the right thing or if that'll default back to 1000px or something. (Basically we want the viewport size to match the webview's native size -- which may not actually be the width of the entire device if we're being embedded.)
Comment 3 Greg 2011-09-28 18:45:12 UTC
Brion,

thanks again for your quick investigation!

I'm not sure if this will help, but I can ensure this problem is quite new and didn't happen in June, July or August (I took many screenshots the 24th august for a few apps so I'm quite sure)

Besides it seems to me that the mobile wikipedia looks very well on my computer screen (whatever the size of my firefox window until < 300px) so as a user I think would be happy with exactly the same page on my ipad... There should be a reason for this <meta> viewport I'm missing?

thanks a lot for your help!

regards
Comment 4 Patrick Reilly 2011-09-30 21:16:54 UTC
I think for now just reverting to way the Ruby gateway had that viewport line is going to be the easiest potential fix. The change should go out next Tuesday.

— Patrick
Comment 5 Patrick Reilly 2011-09-30 21:19:54 UTC
This fix is in r98566.
Comment 6 Brion Vibber 2011-12-01 15:11:27 UTC
Greg's indicated there are still problems (possibly a regression?). Reopening, need to double-check status.
Comment 7 Greg 2011-12-01 17:33:25 UTC
Yes I confirm the problem came back a few weeks ago (around oct 27).
It seems the viewport meta tag was added back.

If there's anything we can do to help we'd be happy to work on that issue. 
By the way I was wondering if this viewport is really useful on tablets (=quite large screens) and if there's a way to put the viewport only on phones (=with smaller screens)

thanks for your help!

- Greg
Comment 8 Brion Vibber 2011-12-01 18:18:02 UTC
I think what we theoretically want is a viewport that defines a 1.0 zoom ratio and just sticks with that; otherwise I'd expect it to default to the 980px or so virtual viewport width, which won't look good if your browser is actually half the width of an iPad screen or something.
Comment 9 Richard 2012-02-23 20:32:37 UTC
I'd also like to ad my vote to this issue. I also see the problem and that it used to work.

Is there any way to or have a change made to specify the content width along the lines of http://en.m.wikipedia.org/w/index.php?title=Jupiter&device-width=320.0?

Ideally I'd like to see things work the way they used to.
Comment 10 Greg 2012-03-08 07:04:35 UTC
Hello!
Brion suggested a few months ago that it could be worth trying to delete the "width=device-width" and just let "initial-scale=1.0" 

did someone had the time to check this?
Comment 11 Richard 2012-03-08 19:24:42 UTC
Yes removing "width=device-width" works.
Comment 12 Jon 2012-03-09 11:04:01 UTC
This has been fixed in r113463. It was fixed by switching the meta tag from
<meta name="viewport" content="width=device-width, initial-scale=1.0">
to
<meta name="viewport" content="max-width=device-width, initial-scale=1.0">

We don't want to remove the tag fully or to remove the width value as
pages will not be optimised for reading on iphones, androids etc...
more information here [1]

With help from Greg (thanks Greg!) this has been tested and works nicely so closing!
Comment 14 Arthur Richards 2012-03-13 22:50:25 UTC
Reopening this issue. Unfortunately r113463 causes the following error in Chrome: "Viewport argument key "max-width" not recognized and ignored."
Comment 15 Jon 2012-03-13 23:16:46 UTC
This is still actually fixed. See r113693

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links