[TIMOB-16220] iOS: Ti.UI.WebView doesn't trigger 'load' event when having 'touchEnabled' set to false
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2016-10-18T20:02:26.000+0000 |
Affected Version/s | Release 3.2.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | WebView, evalJs, eventlistener, load |
Reporter | Martin van Dam |
Assignee | Hans Knöchel |
Created | 2014-01-16T14:10:55.000+0000 |
Updated | 2017-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');
});
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.
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
Cannot reproduce in Titanium 5.5.1.GA and iOS 10.
Closing ticket as the issue cannot be reproduced.