Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24252] Windows: touchEnabled property/method applied but without any effect

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-02-09T11:46:37.000+0000
Affected Version/sRelease 6.0.0
Fix Version/sRelease 6.1.0
ComponentsWindows
Labelsn/a
ReporterRicardo Pereira
AssigneeKota Iguchi
Created2016-11-15T17:38:12.000+0000
Updated2017-02-14T19:38:35.000+0000

Description

I've only tested in local app: appc run -p windows -T ws-local test project attached *Classic code*
var win = Ti.UI.createWindow({
    backgroundColor: 'green'
});

var view1 = Ti.UI.createView({
    backgroundColor: 'blue',
    width: 100, height: 100,
    top: 100, left: 100,
    touchEnabled: false
}),
view2 = Ti.UI.createButton({
    backgroundColor: 'red',
    width: 100, height: 100,
    top: 110, left: 110,
    touchEnabled: false
}),
view3 = Ti.UI.createLabel({
    backgroundColor: 'yellow',
    width: 100, height: 100,
    top: 120, left: 120,
    touchEnabled: false
}),
view4 = Ti.UI.createImageView({
    backgroundColor: 'pink',
    width: 100, height: 100,
    top: 130, left: 130,
    touchEnabled: false
}),
view5 = Ti.UI.createTextArea({
    backgroundColor: 'blue',
    width: 100, height: 100,
    top: 140, left: 140,
    touchEnabled: false
}),
view6 = Ti.UI.createListView({
    backgroundColor: 'red',
    width: 100, height: 100,
    top: 150, left: 150,
    touchEnabled: false
}),
view7 = Ti.UI.createTextField({
    backgroundColor: 'yellow',
    width: 100, height: 100,
    top: 160, left: 160,
    touchEnabled: false
}),
view8 = Ti.UI.createPicker({
    backgroundColor: 'pink',
    width: 100, height: 100,
    top: 170, left: 170,
    touchEnabled: false
}),
view9 = Ti.UI.createView({
    backgroundColor: 'blue',
    width: 100, height: 100,
    top: 180, left: 180,
    touchEnabled: false
}),
view10 = Ti.UI.createScrollableView({
    backgroundColor: 'red',
    width: 100, height: 100,
    top: 190, left: 190,
    touchEnabled: false
}),
view11 = Ti.UI.createScrollView({
    backgroundColor: 'pink',
    width: 100, height: 100,
    top: 200, left: 200,
    touchEnabled: false
}),
view12 = Ti.UI.createSlider({
    backgroundColor: 'yellow',
    width: 100, height: 100,
    top: 210, left: 210,
    touchEnabled: false
}),
view13 = Ti.UI.createSwitch({
    backgroundColor: 'pink',
    width: 100, height: 100,
    top: 220, left: 220,
    touchEnabled: false
});

var onClick = function (e) {
    alert('click from ' + e.source.apiName)
};

view1.addEventListener('click', onClick);
view2.addEventListener('click', onClick);
view3.addEventListener('click', onClick);
view4.addEventListener('click', onClick);
view5.addEventListener('click', onClick);
view6.addEventListener('click', onClick);
view7.addEventListener('click', onClick);
view8.addEventListener('click', onClick);
view9.addEventListener('click', onClick);
view10.addEventListener('click', onClick);
view11.addEventListener('click', onClick);
view12.addEventListener('click', onClick);
view13.addEventListener('click', onClick);

var btn = Ti.UI.createButton({
    title: 'Toggle touchEnabled -> ' + (!view1.touchEnabled),
    bottom: 0, left: 0,
    backgroundColor:'red'
});

btn.addEventListener('click', function () {
    view1.touchEnabled = !view1.touchEnabled;
    view2.touchEnabled = !view2.touchEnabled;
    view3.touchEnabled = !view3.touchEnabled;
    view4.touchEnabled = !view4.touchEnabled;
    view5.touchEnabled = !view5.touchEnabled;
    view6.touchEnabled = !view6.touchEnabled;
    view7.touchEnabled = !view7.touchEnabled;
    view8.touchEnabled = !view8.touchEnabled;
    view9.touchEnabled = !view9.touchEnabled;
    view10.touchEnabled = !view10.touchEnabled;
    view11.touchEnabled = !view11.touchEnabled;
    view12.touchEnabled = !view12.touchEnabled;
    view13.touchEnabled = !view13.touchEnabled;
    btn.title = 'Toggle touchEnabled -> ' + (!view1.touchEnabled);
});

win.add(view1);
win.add(view2);
win.add(view3);
win.add(view4);
win.add(view5);
win.add(view6);
win.add(view7);
win.add(view8);
win.add(view9);
win.add(view10);
win.add(view11);
win.add(view12);
win.add(view13);
win.add(btn);

win.open();

Attachments

FileDateSize
Disabled.PNG2017-02-14T19:31:26.000+000010756
Enabled.PNG2017-02-14T19:31:26.000+000014647
Windows Tests.zip2016-11-18T17:05:17.000+0000471859

Comments

  1. Ricardo Pereira 2016-11-18

    test project with 3 bugs: - touchEnabled - zIndex - borderRadius
  2. Kota Iguchi 2017-02-09

    https://github.com/appcelerator/titanium_mobile_windows/pull/946
  3. Samir Mohammed 2017-02-14

    Verified fixed, was able to enable and disable touchEnabled and see the various effects. If touchEnabled was disabled then I was not able to click anything and if touchEnabled was enabled I was able to click the various items. Disabled !Disabled.PNG|thumbnail! Enabled !Enabled.PNG|thumbnail! *Environment*
       Windows Emulator: 10.0.14393
       Phone : Lumia 640 LTE (RM-1073)
       Operating System:
       Name                        = Microsoft Windows 10 Pro
       Version                     = 10.0.14393
       Architecture                = 32bit
       

    CPUs = 4

    Memory = 17034395648 Node.js: Node.js Version = 4.6.0 npm Version = 2.15.9 Titanium SDK: SDK Version = 6.1.0.v20170213134957
  4. Samir Mohammed 2017-02-14

    ^^ Verified using the test case provided in https://github.com/appcelerator/titanium_mobile_windows/pull/946

JSON Source