Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19401] Windows: Missing events for Ti.UI.View

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-09-17T22:59:20.000+0000
Affected Version/sRelease 4.0.0
Fix Version/sRelease 5.0.1
ComponentsWindows
Labelsn/a
ReporterKota Iguchi
AssigneeKota Iguchi
Created2015-08-25T01:56:04.000+0000
Updated2015-09-22T19:34:23.000+0000

Description

Missing events for Ti.UI.View, such as click, singletap, swipe and so on. Currently it only supports touchmove and focus.

Comments

  1. Kota Iguchi 2015-08-26

    https://github.com/appcelerator/titanium_mobile_windows/pull/417
  2. Ewan Harris 2015-09-11

    Reopening ticket: Windows 8.1 Appc CLI Core: 5.0.0-50 Appc CLI NPM: 4.2.0-1 Titanium SDK : 5.0.0.v20150911123911 Lumia 930 (8.1) When using the below code I do not see events get fired for for *touchstart* and *touchend* and the behaviour for *longpress* differs to Android and iOS. On Windows when listening for the *longpress* event the callback will be called twice, when the duration for a longpress is met and when the press is released, on iOS and Android a longpress is only fired once, when the length of time is met.
       var win = Ti.UI.createWindow({ backgroundColor: 'blue' });
       
       var lpview = Ti.UI.createView({
           backgroundColor: 'red',
           width: 100, height:100,
           top: 10
       });
       
       
       lpview.addEventListener('longpress', function(e){
       	console.log('You longpressed me!');
       	console.log(JSON.stringify(e));
       });
       
       var touchview = Ti.UI.createView({
           backgroundColor: 'purple',
           width: 100, height:100,
           top: 150
       });
       
       
       touchview.addEventListener('touchstart', function(e){
       	console.log('You touchstart me!');
       	console.log(JSON.stringify(e));
       });
       
       touchview.addEventListener('touchend', function(e){
       	console.log('You touchend me!');
       	console.log(JSON.stringify(e));
       });
       
       win.add(lpview);
       win.add(touchview);
       
       win.open()
       
  3. Kota Iguchi 2015-09-17

  4. Ewan Harris 2015-09-22

    Verified using: Windows 8.1 Appc Core 5.0.2-19 Appc NPM 4.2.0 Ti SDK 5.0.1.v20150922104152 Nokia Lumia 930 8.1 Using the code below the touchstart and touchend events are now fired and the longpress event is only fired once
       var win = Ti.UI.createWindow({ backgroundColor: 'blue' });
        
       var lpview = Ti.UI.createView({
           backgroundColor: 'red',
           width: 100, height:100,
           top: 10
       });
        
        
       lpview.addEventListener('longpress', function(e){
       	console.log('You longpressed me!');
       	console.log(JSON.stringify(e));
       });
        
       var touchview = Ti.UI.createView({
           backgroundColor: 'purple',
           width: 100, height:100,
           top: 150
       });
        
        
       touchview.addEventListener('touchstart', function(e){
       	console.log('You touchstart me!');
       	console.log(JSON.stringify(e));
       });
        
       touchview.addEventListener('touchend', function(e){
       	console.log('You touchend me!');
       	console.log(JSON.stringify(e));
       });
        
       win.add(lpview);
       win.add(touchview);
        
       win.open()
       
       
    Closing ticket

JSON Source