Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15763] Android: Ti.App.fireEvent will not work on file missing .html extension

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2014-03-26T23:59:58.000+0000
Affected Version/sRelease 3.1.3
Fix Version/sRelease 3.3.0
ComponentsAndroid
LabelsSupportTeam, module_webview, qe-closed-3.3.0, qe-testadded, triage
ReporterSteven Lam
AssigneeIngo Muschenetz
Created2013-11-21T01:07:42.000+0000
Updated2014-05-08T10:40:54.000+0000

Description

Steps to Reproduce

when putting in a file without .html extension, the command not work. for example, Ti.App.fireEvent() not work in .xhtml file but work in .html file

Actual Result

Ti.App.fireEvent() not work in .xhtml file

Expected Result

Ti.App.fireEvent() should work in .xhtml file

Comments

  1. Ingo Muschenetz 2013-11-21

    Why do you need to use .xhtml?
  2. Steven Lam 2013-11-21

    coz ePub is using xhtml, and I want to read these xhtml files in ePub By making the ePub file compatible with other application, I leave the extension as xhtml
  3. Sunila 2014-03-01

    I can't reproduce the problem. Created a file called test2.xhtml with the following content
       <html>
       <head>
       </head>
       <body>
       <script type='text/javascript'>Ti.App.fireEvent('someEvent');</script>
       test
       </body>
       </html>
       
    Test code
       var win = Ti.UI.createWindow({ backgroundColor : 'yellow' });
       var webview = Ti.UI.createWebView({ url: "test2.xhtml" });
       win.add(webview);
       Ti.App.addEventListener("someEvent", function(e) { Ti.API.info("app event"); });
       win.open();
       
  4. Hieu Pham 2014-03-26

    This is working fine on master and 3.2.2.GA. Closing
  5. Priya Agarwal 2014-05-08

    Verified the FIXED with: Appc-Studio:3.3.0.201405011408 sdk:3.3.0.v20140507163312 acs:1.0.14 alloy:1.4.0-dev npm:1.3.2 titanium:3.3.0-dev titanium-code-processor:1.1.1 xcode:5.1.1 Device:Iphone5s(v7.1.1),Nexus7(v4.4.2) Events are being fired from .xhtml file.Working as expected for Android. Hence Closing the issue. But not working for iOS issue already logged TIMOB-15762

JSON Source