[TIMOB-2456] TiUIWebView::webViewDidStartLoad and webViewDidFinishLoad
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Medium |
| Status | Closed |
| Resolution | Needs more info |
| Resolution Date | 2012-07-26T12:02:46.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | iOS |
| Labels | n/a |
| Reporter | Dieter Wimberger |
| Assignee | Neeraj Gupta |
| Created | 2011-04-15T03:20:15.000+0000 |
| Updated | 2012-07-26T22:04:01.000+0000 |
Description
In the TiUIWebView class webViewDidStartLoad and
webViewDidFinishLoad methods that are used for calling the event
listeners:
The events that are generated will not provide the correct
URL's.
The problem seems to be in this line:
NSDictionary *event = url == nil ? nil : [NSDictionary dictionaryWithObject:[url absoluteString] forKey:@"url"];
The instance variable url seems to be commonly nil, so nothing is returned.
The expected behavior for the listeners would rather be:
NSString *url__ = [self url];
NSDictionary *event = url__ == nil ? nil : [NSDictionary dictionaryWithObject:url__ forKey:@"url"];
Because it will give access to the URL that is actually used in the request that is causing the events.
Does not include complete & valid test case.
Code fixes are not an appropriate "bug report".
When these are resolved the ticket may be reopened.