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

iOS: JavaScript click event is not registered when parent webview's click event is also handled

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Invalid
    • Affects Version/s: Release 3.1.2
    • Component/s: iOS
    • Labels:
    • Environment:

      SDK: 3.1.2.v20130809141556
      Appcelertaor Studio: 3.1.2.201308091728
      OS: OSX 10.8.4
      Device: iPhone5(v 6.1.4)
      Xcode: 4.6.3

      Description

      Javascript click event is not registered when parent webview's click event is also handled. This is not regression since the issue occurs on 3.1.1 GA as well.

      Steps to reproduce:

      1. Create an app using the code below.
      2. Launch the app.
      3. Click on 'click me' label.

      Expected:
      Alert should appear on screen with message "123456"

      Actual:
      No alert appears with the above message.

      var _window = Titanium.UI.createWindow({  
          
          backgroundColor:'#fff'
      });
      _window.backgroundColor = 'yellow'
       
      	_window.addEventListener('click', function(e) {
      		alert('Window clicked');
      	});
      	var webView = Titanium.UI.createWebView({
      		top : 30
      	});
      	var html = '<html>' + '<body>' + '<br />' + '<br />' + '<br />' + '<br />' + '<br />' + '<br />' + '<a onclick="javascript:alert(123456)">Click me!</a>' + '</body>' + '</html>';
      	webView.html = html;
      	webView.addEventListener('click', function(e) {
      		alert('WebView Clicked');
      	});
      	_window.add(webView);
              _window.open();
      

        Attachments

          Activity

            People

            • Assignee:
              ingo Ingo Muschenetz
              Reporter:
              amittal Anshu Mittal
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code