Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2456] TiUIWebView::webViewDidStartLoad and webViewDidFinishLoad

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionNeeds more info
Resolution Date2012-07-26T12:02:46.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterDieter Wimberger
AssigneeNeeraj Gupta
Created2011-04-15T03:20:15.000+0000
Updated2012-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.

Comments

  1. Stephen Tramer 2012-07-26

    Does not include complete & valid test case.

    Code fixes are not an appropriate "bug report".

    When these are resolved the ticket may be reopened.

JSON Source