[TIMOB-835] iOS: WebView doesn't change it's "url" dynamic property
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-11-05T15:44:24.000+0000 |
Affected Version/s | Release 1.6.2 |
Fix Version/s | Sprint 2011-24, Release 1.8.0 |
Components | iOS |
Labels | n/a |
Reporter | Gabriel Cox |
Assignee | Blain Hamon |
Created | 2011-04-15T02:37:28.000+0000 |
Updated | 2011-11-05T15:44:24.000+0000 |
Description
This seems similar for bug #804 (Android), but this also applies to
iPhone. After a webview is launched, the URL property does not
change when clicking to a link to another URL, or when a redirect
happens.
I tried unsuccessfully using this to catch an Oauth redirected callback URL.
Comments
- Gabriel Cox 2011-04-15
Assigning to Jeff for distribution.
- Jacob Waller 2011-04-15
Can we pretty please also have a locationChange event when the url changes (also for remote webviews)?
This doesn't sound like much, but would be a killer feature for me! - Blain Hamon 2011-06-06 @Jacob: WebView already has a 'load' event that fires whenever a page loads. This event even has a property called 'url' that, when the webview reflects an url instead of being called with setHtml or setData, is accurate to the new page.
- Blain Hamon 2011-06-06 On a successful page load, we change the proxy's url to reflect the new page.
- Eric Merriman 2011-06-06 There is no sample code attached with this bug, (nor with the original LH ticket), could we get a quick test attached?
- Blain Hamon 2011-06-17
D'oh. Let's add some code, shall we?
var win = Ti.UI.createWindow(); var webview = Ti.UI.createWebView({url:'http://www.google.com',bottom:50}); var button = Ti.UI.createButton({title:'Log URL',height:50,bottom:0}); button.addEventListener('click',function(E){ Ti.API.debug('Url is now: '+webview.url); }); win.add(webview); win.add(button); win.open();
- Blain Hamon 2011-06-21 Pull request merged.
- Natalie Huynh 2011-08-25 Tested with 1.8.0.v20110819142548 iPhone 4.3.4 iPad2 4.3.2 Motorola Xoom 3.2 Nexus One 2.2.2
- Don Thorp 2011-11-05 Standardizing summary and labels.