Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15026] MobileWeb: Ability to zoom in/out the webpage for external url

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionWon't Fix
Resolution Date2014-04-20T23:14:19.000+0000
Affected Version/sRelease 3.1.1, Release 3.1.2
Fix Version/s2014 Sprint 08, 2014 Sprint 08 Tooling, Release 3.3.0
ComponentsMobileWeb
LabelssupportTeam
ReporterRupesh Sharma
AssigneeChris Barber
Created2013-09-03T11:53:25.000+0000
Updated2017-03-20T18:11:40.000+0000

Description

Description

when we open the external url user should be able to zoom in/out the webpage.

Comments

  1. Chris Barber 2013-09-03

    Note that this issue relates to viewing pdfs and Word docs inside the webview.
  2. Chris Barber 2014-04-20

    Unfortunately, we can't do anything about this. Titanium Mobile Web uses iframes as WebViews. On iOS Mobile Safari (and possibly other mobile browsers) iframes are NOT resizable. The content is rendered 1-to-1. We have to clamp it with a
    with overflow=auto to restrict the WebView to a specific size. This also solves the problem of scrolling around the WebView. Because the content is 1:1, Mobile Safari does not let you resize it. Turns out we can apply a scale transform to the iframe and that will resize it, but then we'd need to tie it to a pinch gesture. Unfortunately, the touch events needed for the pinch gesture are intercepted by the iframe. The parent window (the Titanium Mobile Web app) never gets the events and so we can't mimic the pinch zoom. As a workaround, you could create zoom in/out buttons and have them apply a scale transform to your WebView's inner iframe, but that would be Mobile Web specific and extremely hacky. Another option would be to open the URL in a new window. Unfortunately, Ti.Platform.openURL() uses a WebView, so you'd have to call the browser's built-in window.open(). Again, this is Mobile Web specific and should be wrapped in a if-block.
  3. Lee Morris 2017-03-20

    Closing ticket as the issue will not fix.

JSON Source