[TIMOB-13923] Android: WebView click events do not fire when distributed to device
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-10-22T22:22:19.000+0000 |
Affected Version/s | Release 2.1.1 |
Fix Version/s | 2013 Sprint 12 Core, 2013 Sprint 12, Release 3.2.0 |
Components | Android |
Labels | module_webview, supportTeam |
Reporter | Jamie Buckley |
Assignee | Allen Yeung |
Created | 2013-05-20T21:23:02.000+0000 |
Updated | 2013-10-22T22:22:24.000+0000 |
Description
When building the app for distribution on Android. Click events on web view are no longer fired, however when building for development the app works fine.
This occurs when adding a click event to a webview
app.js
var webView = Titanium.UI.createWebView({
scalesPageToFit : true,
left : 0,
width : '100%',
showScrollbars : false,
willHandleTouches : false,
disableBounce: true,
anchorPoint: {
x: 0.5,
y: 0.5
}
});
var html = '<html>' +
'<head>' +
'<meta name="viewport" content="width=device-width,user-scalable=yes,initial-scale=1">' +
'<script src="lib/web/Mmf/global.js"></script>' +
'</head>' +
'<body>' +
'<a href="javascript:clickme()">Click here</a>' +
'</body>' +
'</html>';
webView.html = html;
globals.js
function clickme() {
alert('Click!');
}
Attachments
File | Date | Size |
---|---|---|
webViewClick.zip | 2013-05-21T16:50:48.000+0000 | 9694352 |
I attempted to use sample attached. Works on 3.1.0.GA, anything below does not:
2.1.1.GA
2.1.5.v20130226113056
[~egomez], for the scenario you are talking about, I would try the first approach that I mentioned. From the use case description, it looks like you will need to disable minification completely. When testing those PRs, I would make sure you have the SKIP_JS_MINIFY environment variable defined. Let me know if that works.
Going to resolve this as fixed.
Verified fixed. TiSDK 3.2.0.v20131022050844 CLI 3.2.0 Android Galaxy Note II 4.1.2 Android Google Nexus Galaxy 4.3 Closing.