Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16220] iOS: Ti.UI.WebView doesn't trigger 'load' event when having 'touchEnabled' set to false

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionCannot Reproduce
Resolution Date2016-10-18T20:02:26.000+0000
Affected Version/sRelease 3.2.0
Fix Version/sn/a
ComponentsiOS
LabelsWebView, evalJs, eventlistener, load
ReporterMartin van Dam
AssigneeHans Knöchel
Created2014-01-16T14:10:55.000+0000
Updated2017-03-29T01:02:23.000+0000

Description

When you add a Titanium.UI.WebView with the property _touchEnabled_ set to _false_, the _load_ event will not get triggered anymore. As the documentation for WebViews ^*^ describes for using the _evalJS()_ method, I'm calling the _evalJS_ method from the _load_ event. ^*^ http://docs.appcelerator.com/titanium/latest/#!/guide/Communication_Between_WebViews_and_Titanium Tested on iOS only. Sample: someWebView1 load event does not get triggered while someWebView2 load event does get triggered.
var someWebView1 = Ti.UI.createWebView({
    top: 0,
    width: 500,
    height: 500,
    backgroundColor: '#fafafa',
    url: 'http://www.google.com',
    touchEnabled: false
});
someWebView1.addEventListener('load', function(e) {
    alert('loaded someWebView1');
});

var someWebView2 = Ti.UI.createWebView({
    top: 0,
    width: 500,
    height: 500,
    backgroundColor: '#fafafa',
    url: 'http://www.google.com'
});
someWebView2.addEventListener('load', function(e) {
    alert('someWebView2');
});

Comments

  1. Ritu Agrawal 2014-01-17

    Moving this ticket to engineering as I can reproduce this issue with the provided test case on iOS platform (but not on Android) when touchEnabled property is set to true. It works fine when touchEnabled is set to true or not specified at all. It works under all scenarios on Android. Note that this ticket is not a duplicate of TIMOB-16063 as that ticket is Android specific and this ticket is iOS specific.
  2. Shameer Jan 2014-09-19

    Issue reproduce 3.2.0 and 3.4.0 Appcelerator Studio, build: 3.3.0.201407111535 TiSDK 3.4.0 iOS SDK: 7.1 Titanium Command-Line Interface, CLI version 3.3.0
  3. Hans Knöchel 2016-10-18

    Cannot reproduce in Titanium 5.5.1.GA and iOS 10.
  4. Lee Morris 2017-03-29

    Closing ticket as the issue cannot be reproduced.

JSON Source