[TIMOB-20372] Windows: Ti.App.fireEvent and listener doesnt work in static javascript/html page loaded in webview
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2016-02-11T01:13:00.000+0000 |
Affected Version/s | Release 5.1.2 |
Fix Version/s | Release 5.3.0 |
Components | Windows |
Labels | qe-5.3.0, titanium, webview, windowsphone |
Reporter | Nejc Robnik |
Assignee | Kota Iguchi |
Created | 2016-02-08T22:56:37.000+0000 |
Updated | 2016-05-02T22:47:08.000+0000 |
Description
While building a simple app for all three platforms we used leaflet map with webview. While android and ios had no issues communicating with javascript embedded in web page, there is no communication with webview on windows phone platform. I have made a simple project in which i can get response in android/ios but not windows phone:
logging.html
index.js
var win = Ti.UI.createWindow();
var webview = Ti.UI.createWebView({
url: 'logging.html'
});
var button = Ti.UI.createButton({
title: 'fromTitanium',
height: '50dp',
width: '130dp'
});
button.addEventListener('click', function(e) {
Ti.App.fireEvent('app:fromTitanium', { message: 'event fired from Titanium, handled in WebView' });
});
Ti.App.addEventListener('app:fromWebView', function(e) {
alert(e.message);
});
win.add(webview);
win.add(button);
win.open();
Duplicate of TIMOB-20289, should be fixed in the latest master. Will be scheduled to release in 5.3.0.
Verified as fixed Tested on: Nokia Lumia 928 (8.1) Windows Simulator (8.1) Microsoft Lumia 640 (10) Windows Simulator (10) Windows 10 Studio: 4.6.0.201604290815 Ti SDK: 5.3.0.v20160502130737 Appc NPM: 4.2.5-5 App CLI: 5.3.0-42 Node v4.4.3 *Closing Ticket.*