Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1865] Android: Ti.App.addEventListener doesn't work inside a WebView under SDK 3.0

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2013-04-04T23:46:07.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsregression
ReporterMark Burggraf
AssigneeMauro Parra-Miranda
Created2012-12-15T21:47:20.000+0000
Updated2016-03-08T07:40:46.000+0000

Description

Under SDK 2.14, it was possible to trap App-level events inside a webview's javascript block by using Ti.App.addEventListener(). Under 3.0, this no longer seems to work. An easy workaround is to create a function inside the webview, then put the Ti.App.addEventListener code to the javascript module that hosts the webview. Then execute the function inside the webview using webview.evalJS('myfunction()');

Comments

  1. Pedro Enrique 2013-04-04

    Could you upload a sample project that demonstrates the issue? Also, check the latest 3.1 SDK

JSON Source