Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14118] iOS: Media - Click event is supressed by touchstart event when invoked together

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2014-04-07T23:51:42.000+0000
Affected Version/sRelease 3.1.1
Fix Version/sn/a
ComponentsiOS
Labelsqe-3.1.1
ReporterAnshu Mittal
AssigneeIngo Muschenetz
Created2013-06-05T05:49:11.000+0000
Updated2017-03-27T20:51:41.000+0000

Description

Click event is supressed by touchstart event when invoked together. This is not regression since the issue occurs in 3.1.0 GA as well. Steps to reproduce: 1. Create an app using the code below. 2. click on the video. Expected: Consecutive alerts should alert 'click' and 'touchstart' events. Actual: Only 'touchstart' event is invoked.

Titanium.UI.setBackgroundColor('#000');


var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});

var videoObject = Titanium.Media.createVideoPlayer({
		    contentURL:'movie.mp4',
		    scalingMode:Titanium.Media.VIDEO_SCALING_MODE_FILL,
		    top:0,
		    left:0,
		    height:'100%',
		    width:'100%',
		    autoplay:true
		});
		  
		videoObject.addEventListener('click', function(){
		   alert('click!');});
		   
		   videoObject.addEventListener('touchstart', function(){
		  alert('touchstart!');
		});
		
		win1.add(videoObject);
		win1.open();

Comments

  1. Sabil Rahim 2014-04-07

    Marking Ticket as Cannot Reproduce. This could have been a issue long time back. Tested with following Test code.
       Titanium.UI.setBackgroundColor('#000');
        
        
       var win1 = Titanium.UI.createWindow({  
           title:'Tab 1',
           backgroundColor:'#fff'
       });
        
       var videoObject = Titanium.Media.createVideoPlayer({
                   url:'movie.mp4',
                   scalingMode:Titanium.Media.VIDEO_SCALING_MODE_FILL,
                   top:0,
                   left:0,
                   height:'100%',
                   width:'100%',
                   autoplay:true
               });
          
       videoObject.addEventListener('click', function(){
          Ti.API.info('click!');});
       	
       videoObject.addEventListener('touchstart', function(){
         Ti.API.info('touchstart!');
       });
        
       win1.add(videoObject);
       win1.open();
       
  2. Lee Morris 2017-03-27

    Closing ticket as I am unable to reproduce this issue with the following environment; iPhone 7 (10.2) MacOS 10.11.6 (15G31) Studio 4.8.1.201612050850 Ti SDK 6.0.3 GA Appc NPM 4.2.8 Appc CLI 6.1.0 Ti CLI 5.0.11 Alloy 1.9.5 Arrow 1.10.1 Xcode 8.2 (8C38) Node v4.6.0 Java 1.7.0_80

JSON Source