[TIMOB-836] iOS: Ti.* functions fail within webview after additional page loads.
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Closed |
| Resolution | Cannot Reproduce |
| Resolution Date | 2017-06-26T23:22:13.000+0000 |
| Affected Version/s | Release 1.6.0, Release 3.0.0 |
| Fix Version/s | n/a |
| Components | iOS |
| Labels | n/a |
| Reporter | Gabriel Cox |
| Assignee | Ingo Muschenetz |
| Created | 2011-04-15T02:37:30.000+0000 |
| Updated | 2017-06-26T23:22:13.000+0000 |
Description
Ti.* functions fail within webview after additional page loads. This can be reproduced by creating links with to an additional page with a call like Ti.API.info("message"). I have only tried this on iPhone, but it may be elsewhere. This affects an Oauth implementation since a redirect to a callback url is used at the end of the authorization.
example:
var webview = Ti.UI.createWebView({url:'app://Resources/test2.html'});
Ti.UI.currentWindow.add(webview);
test2.html
<html>
<head>
<script>
Ti.API.info("in test2.html"); // console will show "in test2.html"
</script>
</head>
<body>
<h1>Test 2</h1>
<a href='/test3.html'>Click to Test3</a>
</body>
</html>
test3.html
<html>
<head>
<script>
Ti.API.info("in test3.html"); // PROBLEM: console will show nothing...
</script>
</head>
<body>
<h1>Test 3</h1>
</body>
</html>
Sorry, test2.html above didn't encode as I intended. Trying a different method.
{mkd-extraction-e98647f60da57ec8b80b213d12dc331f}
{mkd-extraction-bb3970ac74fe1f13090ef8573691f334}Trying "
Test 2
Click to Test3Got it -- ignore 2 previous comments (wish I could delete them)
test2.html
(now I see the "preview" -- sorry I'm new to this...)
Not sure who to assign to -- Assuming Jeff as the distributor.
Bumping into triage.
Bug Scrub: Valid. No Test Case exists. Tested On: Mac OSX Lion TiMob Version: 1.7.2 TiStud Version: 1.0.2 Devices used: iPhone 4.3.4
Issue still reproducible on the iOS simulator using TiSDK 2.2.0v20120810194112. app.js
test2.htmlvar win = Ti.UI.createWindow({backgroundColor: 'white'}); var webview = Ti.UI.createWebView({url:'test2.html'}); win.add(webview); win.open();test3.html<html> <head> <script> Ti.API.info("in test2.html"); // console will show "in test2.html" </script> </head> <body> <h1>Test 2</h1> <a href='test3.html'>Click to Test3</a> </body> </html><html> <head> <script> Ti.API.info("in test3.html"); // PROBLEM: console will show nothing... </script> </head> <body> <h1>Test 3</h1> </body> </html>I am unable to reproduce this issue with the following environment; iPhone 7 (10.2) Studio 4.9.0.201705302345 Ti SDK 6.1.1.v20170623141152 Appc NPM 4.2.9 Appc CLI 6.2.1 Ti CLI 5.0.13 Alloy 1.9.11 Arrow 2.0.0 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131