Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24859] Windows: Touch* events on mobile device only fire after the TableView has been clicked

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionWon't Fix
Resolution Date2021-02-11T12:13:36.000+0000
Affected Version/sRelease 6.1.0, Release 6.1.1
Fix Version/sn/a
ComponentsWindows
Labelsn/a
ReporterEwan Harris
AssigneeUnknown
Created2017-06-20T12:01:57.000+0000
Updated2021-02-11T12:13:36.000+0000

Description

Description

When using the touchstart, touchmove and touchend events on a Windows mobile device, the events will only fire after the UI element has been clicked, this is how the native Windows event behaves (see pointermoved https://docs.microsoft.com/en-us/windows/uwp/input-and-devices/handle-pointer-input) but it is different to other platforms We should either determine if the common behaviour is achievable on mobile and if not, note so in the docs The behaviour occurs as expected on a Windows 10 desktop machine
var _window = Ti.UI.createWindow();
var MyListbox = Ti.UI.createTableView();
for (var i = 1;
    (i <= 10); i++)
    MyListbox.appendRow(Ti.UI.createTableViewRow({
        title: 'Row ' + i
    }));

Ti.API.info('adding EventListener for touchstart');
MyListbox.addEventListener('touchstart', TchStart);
function TchStart(evt) {
    Ti.API.info('TchStart');
}
Ti.API.info('adding EventListener for touchmove');
MyListbox.addEventListener('touchmove', TchMove);
function TchMove(evt) {
    Ti.API.info('TchMove');
}
_window.add(MyListbox);
_window.open();

Steps to reproduce

Add the above to an existing app.js

Build for a windows target

Touch the view lightly

Touch the view so a click event is registered

Actual

On a mobile device the event is only fired after a click event

Expected

Based off other platforms the event should be fired when scrolling the view

Comments

No comments

JSON Source