Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2995] webview link doesn't click

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2012-07-26T13:23:39.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsdefect, ios, reported-1.5.1
ReporterAndrew Scofield
AssigneeNeeraj Gupta
Created2011-04-15T03:34:21.000+0000
Updated2012-07-26T21:33:35.000+0000

Description

I've found a bug with the webview module for titanium mobile. If a website loaded through the url property contains an html link such as

<a href="test.html">Test Link</a>

nothing happens when this link is clicked. If the link is changed to container an absolute url, it works just fine:

<a href="/test.html">Test Link</a>

OR

<a href="http://www.somewebsite.com/test.html">Test Link</a>

If I load this html through the html property it clicks just fine.

Comments

  1. Andrew Scofield 2011-04-15

    Anybody able to confirm this?

  2. hal 2011-04-15

    I doubt it, Andrew, until you can provide a way for someone to reproduce the behavior. Do you know a webpage that can be tested against?

    Furthermore, you have not stated your mobile platform & version or Titanium version, rendering your observations meaningless.

    You really should not raise a ticket until you have read the http://guides.appcelerator.com/en/contribute.html">Contribute to Titanium guide, or it, and tickets like it, risk hindering rather than helping the development process.

  3. Andrew Scofield 2011-04-15

    Thanks hal for pointing me in the right direction. Been working in titanium for over a year, never seen that link :) ...or submitted a bug for that matter. I'll read through this and get the right info.

  4. hal 2011-04-15

    OP http://developer.appcelerator.com/question/111591/links-broken-in-a-webview"> confirms issue occurs on iphone simulator and iOS device both running iOS 4.2, with Titanium 1.5.1

    The behavior does not exist on Android (although, the versions used to test were not provided).

    User has provided a web page and code to reproduce the issue:

       var webview = Ti.UI.createWebView();
        
       webview.setBasicAuthentication('titanium', 'testpass');
       webview.url = 'http://andrewscofield.com/titanium_auth/'; 
        
       // comment out above two lines and uncomment below to test same html without basic auth.
       //webview.url = 'http://andrewscofield.com/titanium/'; 
        
       var w = Ti.UI.createWindow();
       w.add(webview);
       w.open();
       

    Note, this issue is related (but not identical) to ticket #1603.

  5. Matthew Apperson 2011-06-16

    I tested this and can confirm the issue still exists in 1.7 and 1.8/master As a note, if you click a link that works in the example, then go back, the link that did not work before (formated like Test Link) then works for some reason
  6. Stephen Tramer 2012-07-26

    Unable to reproduce described issue in SDK 2.2.0.014b86f

JSON Source