Problem:
When I combine a webview and a EventListener "swipe", the webview is shown, but does not react at all.
Solution:
Removing the EventListener it works fine.
Test Environments
Mac 10.9.4
Titanium Studio, build: 3.3.0.201407100905
SDK 3.2.0 / 3.3.0
iOS 7
h5 Example code:
var wb = Ti.UI.createWebView({
top:5,
bottom:5,
left:5,
right:5,
width:"auto",
height:"auto",
url: "http:/mobil.spiegel.de",
scalesPageToFit: false
});
win.add(wb);
win.addEventListener('swipe', function(e) {
if (e.direction == 'right'){
Ti.UI.currentWindow.close();
}
});
Hello We tested this issue with the following test code in latest Ti SDK. We can not reproduce this issue.
Test Environments
Mac OS X Ti CLI 3.3.0 Ti SDK 3.3.0.GA IOS Simulator 7.1Test Code
app.jsvar win = Titanium.UI.createWindow(); var wb = Ti.UI.createWebView({ top : 5, bottom : 5, left : 5, right : 5, width : "auto", height : "auto", url : "http:/mobil.spiegel.de", scalesPageToFit : false }); win.add(wb); win.addEventListener('swipe', function(e) { if (e.direction == 'right') { alert(e.direction); } }); win.open();Step to Test
- Create Ti project - Add above code in app.js file - Run Ti project - Swipe right direction its display alert message ThanksPlease check our testcase and let us know if is still failing for you.