Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1259] Webview and EventListener swipe does not work

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2014-08-26T05:44:16.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
LabelsTCSupportTriage, eventlistener, swipe, webView
ReporterMarco Huppertz
AssigneeMauro Parra-Miranda
Created2014-08-09T09:53:36.000+0000
Updated2016-03-08T07:37:39.000+0000

Description

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();
	}
});

Comments

  1. Mostafizur Rahman 2014-08-11

    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.1

    Test Code

    app.js
       
       var 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 Thanks
  2. Mauro Parra-Miranda 2014-08-26

    Please check our testcase and let us know if is still failing for you.

JSON Source