Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-17013

MobileWeb: FireEvent on webview is not working

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Won't Fix
    • Affects Version/s: Release 3.2.1
    • Fix Version/s: None
    • Component/s: MobileWeb
    • Labels:
    • Environment:

      Appc-Studio:3.3.0.201405080918
      sdk:3.3.0.v20140508135704
      acs:1.0.14
      alloy:1.4.0-dev
      npm:1.3.2
      titanium:3.3.0-dev
      titanium-code-processor:1.1.1

    • Sprint:
      2014 Sprint 11 Tooling

      Description

      Steps to reproduce:
      1. Copy paste the code in classic Project and run the app.
      2. Click on WebView.

      Actual Result:
      Getting only One alert.
      alert 1: click event received

      Expected Result:
      Two alerts must be fired.
      alert 1: click event received
      alert 2: WebView received appClicked event

      But Fire Event is working properly on both iOS and Android platforms

      app.js

      var win = Ti.UI.createWindow({
      	backgroundColor : 'black'
      });
       
      var webview = Ti.UI.createWebView({
      	url : "test.html"
      });
       
      webview.addEventListener("click", function() {
      	alert("click event received");
      	Ti.App.fireEvent("appClicked");
      });
       
      win.add(webview);
      win.open(); 
      

      test.html

      <html>
      	<head>
      		<title>Test for textfields</title>
      		<script type="text/javascript">
      			Ti.App.addEventListener("appClicked", function(_event) {
      				alert("WebView received appClicked event");
      			});
      		</script>
      	</head>
      	<body>
      		Testing fire event
      	</body>
      </html>
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cbarber Chris Barber
                Reporter:
                pagarwal Priya Agarwal
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-18742
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration