[TIMOB-17013] MobileWeb: FireEvent on webview is not working
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Medium |
| Status | Closed |
| Resolution | Won't Fix |
| Resolution Date | 2014-05-23T17:31:08.000+0000 |
| Affected Version/s | Release 3.2.1 |
| Fix Version/s | n/a |
| Components | MobileWeb |
| Labels | qe-3.3.0 |
| Reporter | Priya Agarwal |
| Assignee | Chris Barber |
| Created | 2014-05-21T22:22:45.000+0000 |
| Updated | 2017-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>
This is a web limitation. The parent window cannot intercept click or touch events on iframes.
Closing ticket as the issue will not fix.