Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20372] Windows: Ti.App.fireEvent and listener doesnt work in static javascript/html page loaded in webview

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionDuplicate
Resolution Date2016-02-11T01:13:00.000+0000
Affected Version/sRelease 5.1.2
Fix Version/sRelease 5.3.0
ComponentsWindows
Labelsqe-5.3.0, titanium, webview, windowsphone
ReporterNejc Robnik
AssigneeKota Iguchi
Created2016-02-08T22:56:37.000+0000
Updated2016-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();

Comments

  1. Kota Iguchi 2016-02-11

    Duplicate of TIMOB-20289, should be fixed in the latest master. Will be scheduled to release in 5.3.0.
  2. Josh Longton 2016-05-02

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

JSON Source