Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24129] Windows: Click event fired when clicking a tableView with touchEnabled set to false

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionDuplicate
Resolution Date2017-02-07T07:10:36.000+0000
Affected Version/sRelease 6.0.0
Fix Version/sn/a
ComponentsWindows
Labelsqe-6.0.0
ReporterEwan Harris
AssigneeKota Iguchi
Created2016-11-10T10:28:19.000+0000
Updated2017-02-07T07:10:36.000+0000

Description

Description

When tapping a tableviewrow and the tableView has touchEnabled set to false then a click event will still be fired
var _window = Ti.UI.createWindow();
  var tableData = [{
        title: 'one'
    }, {
        title: 'two'
    }, {
        title: 'three'
    }];

    var tableView = Ti.UI.createTableView({
        data: tableData,
        touchEnabled: false
    });
    tableView.addEventListener('click', function(e) {
        alert("Event fired");
    });

    _window.add(tableView);
_windows.open();

Steps to reproduce

Add the above code to an existing app.js and build for Windows Platform

Tap a row

Actual result

Click event fired

Expected result

Click event should not be fired

Comments

  1. Ricardo Pereira 2016-11-15

    I don't think that this is happening only on TableView's, I've created an test app with only a Label inside the Window, after the label click event, it set the 'touchEnabled' property to false for both label and window, but if I click anywhere it still runs the click event.
  2. Kota Iguchi 2017-02-07

    Let me close this, we move this ticket to more general one because this happens on other components too: TIMOB-24252

JSON Source