Discourse 1.7.0.beta4 - Problems due to removal of fixed zoom [Safari / iPhone]

סיכום מבוסס בינה מלאכותית

Users reported a critical usability bug in Discourse 1.7.0.beta4 affecting mobile Safari on iOS 10, where the interface displays an incorrect zoom level that truncates content on the right side. ChrisBeach identified the issue as particularly problematic when opening the compose window, causing text and cursors to go off-screen. While Overgrow noted the problem does not occur on iOS 9.3.5, ntadej clarified that while iOS 10 initially removed support for user-scalable=no, developers can now disable zooming in WebViews. ChrisBeach further discovered that Discourse’s viewport meta tag explicitly sets user-scalable=yes, contributing to the behavior. Recognizing the severity as iOS 10 adoption increases, sam confirmed the issue and proposed a workaround via a specific commit to prevent the egregious resizing during composition, acknowledging that completely disabling zoom is no longer practical. codinghorror and seaninsound expressed frustration with the iOS 10 update, with the latter calling it one of the buggy updates ever released.

I upgraded my Discourse instance recently to the latest code, and have noticed that I can now zoom in mobile Safari. I also upgraded to iOS10, so it may relate to an iOS change and not a Discourse change.

This wouldn’t be a problem in itself, but I’m finding that Discourse is now regularly showing a subtly wrong zoom level, which truncates content on the right-hand side of the UI. Very problematic. Not all users will know to zoom out again.

This wrong zoom problem occurs when opening a compose window and then persists until I zoom manually back out again:

It’s affecting meta.discourse.org too.

3 לייקים

This must be something with iOS 10.. I don’t have this problem on iOS 9.3.5 both iphone and ipad here on Meta.

4 לייקים

Looks like there was a change in iOS10 beta 1 that meant Safari stopped respecting the user-scalable=no meta tag, although it was reverted back to the iOS9 behaviour in iOS10 beta 6, according to this:

No, the “issue” is still here. They just enabled developers to disable this in WebView in apps.

לייק 1

Hope everyone agrees - regardless of the specifics, we’ve got a serious new usability problem here for Discourse. As I type this reply, my cursor and text just went offscreen in the compose box.

iOS 10 uptake will be rapid, as all iPhone software updates are. Most of the mobile users on my forum instance are on iOS - as I’m sure is the case on other forums.

I think the first step might be to examine why the compose window causes the browser to partially zoom in. If we can’t prevent the user zooming, we need to at least present a UI that doesn’t mess up the zoom level itself.

Wait a minute…

In the page source of the Discourse forum:

<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=yes">

user-scalable=yes ???

I can confirm this is a serious issue on iOS 10, will investigate a fix / workaround

4 לייקים

Let’s try this

https://github.com/discourse/discourse/commit/fe7883eeeab6872f68e072063ce95116b389f85a

There is no practical way for us to disable zooming anymore, but this hack works around the resizing while composing which is egregious.

7 לייקים

I won’t be able to try this until my iPhone 7 arrives on Friday. I upgrade my OS like a real Apple user: I throw my old device in the trash and buy a new one.

9 לייקים

I’ll like to know which trash can you will be throwing the old device into :stuck_out_tongue:

12 לייקים

Have had this issue too. Can’t believe iOS10 has been allowed out to the public. It’s one of the buggiest updates I’ve ever suffered through.