Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18112] MobileWeb: TableView ignores clicks when sections are present

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionWon't Fix
Resolution Date2017-05-22T16:41:08.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsMobileWeb
Labelslinvalid, mobileweb, tableview, tableviewrow, tableviewsection
ReporterRudolf Cardinal
AssigneePraveen Innamuri
Created2014-11-28T13:18:31.000+0000
Updated2017-08-24T20:48:55.000+0000

Description

Test code

/*jslint node: true */
"use strict";
/*global Titanium */

function rowClicked(e) {
    Titanium.API.trace("ROW CLICKED: e = " + JSON.stringify(e));
}

var with_sections = true,
    sectionOne = Titanium.UI.createTableViewSection({
        headerTitle: 'section_one'
    }),
    sectionTwo = Titanium.UI.createTableViewSection({
        headerTitle: 'section_two'
    }),
    tableview = Titanium.UI.createTableView({
        height: Titanium.UI.FILL,
        width: Titanium.UI.FILL,
        top: 0,
        showVerticalScrollIndicator: true,
        minRowHeight: 48,
    }),
    rowOne = Titanium.UI.createTableViewRow({
        title: 'row_one'
    }),
    rowTwo = Titanium.UI.createTableViewRow({
        title: 'row_two'
    }),
    win = Titanium.UI.createWindow({ backgroundColor:  '#fff' });

if (with_sections) {
    sectionOne.add(rowOne);
    sectionTwo.add(rowTwo);
    tableview.setData([sectionOne, sectionTwo]);
} else {
    tableview.setData([rowOne, rowTwo]);
}
tableview.addEventListener('click', rowClicked);
win.add(tableview);
win.open();

Behaviour under iOS

- with_sections = true: responds to row clicks, prints sensible e object - with_sections = false: responds to row clicks, prints sensible e object

Behaviour under MobileWeb

- with_sections = true: IGNORES row clicks - with_sections = false: responds to row clicks ALTHOUGH gives "Uncaught TypeError: Converting circular structure to JSON" error

Comments

  1. Lee Morris 2017-08-24

    Mobile Web has been deprecated and will be removed in fixVersion 7.0.0.

JSON Source