Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17013] MobileWeb: FireEvent on webview is not working

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionWon't Fix
Resolution Date2014-05-23T17:31:08.000+0000
Affected Version/sRelease 3.2.1
Fix Version/sn/a
ComponentsMobileWeb
Labelsqe-3.3.0
ReporterPriya Agarwal
AssigneeChris Barber
Created2014-05-21T22:22:45.000+0000
Updated2017-03-20T16:50:43.000+0000

Description

Steps to reproduce: 1. Copy paste the code in classic Project and run the app. 2. Click on WebView. Actual Result: Getting only One alert. alert 1: click event received Expected Result: Two alerts must be fired. alert 1: click event received alert 2: WebView received appClicked event But Fire Event is working properly on both iOS and Android platforms app.js
var win = Ti.UI.createWindow({
	backgroundColor : 'black'
});

var webview = Ti.UI.createWebView({
	url : "test.html"
});

webview.addEventListener("click", function() {
	alert("click event received");
	Ti.App.fireEvent("appClicked");
});

win.add(webview);
win.open(); 
test.html
<html>
	<head>
		<title>Test for textfields</title>
		<script type="text/javascript">
			Ti.App.addEventListener("appClicked", function(_event) {
				alert("WebView received appClicked event");
			});
		</script>
	</head>
	<body>
		Testing fire event
	</body>
</html>

Comments

  1. Chris Barber 2014-05-23

    This is a web limitation. The parent window cannot intercept click or touch events on iframes.
  2. Lee Morris 2017-03-20

    Closing ticket as the issue will not fix.

JSON Source