[TIMOB-24252] Windows: touchEnabled property/method applied but without any effect
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-02-09T11:46:37.000+0000 |
Affected Version/s | Release 6.0.0 |
Fix Version/s | Release 6.1.0 |
Components | Windows |
Labels | n/a |
Reporter | Ricardo Pereira |
Assignee | Kota Iguchi |
Created | 2016-11-15T17:38:12.000+0000 |
Updated | 2017-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
File | Date | Size |
---|---|---|
Disabled.PNG | 2017-02-14T19:31:26.000+0000 | 10756 |
Enabled.PNG | 2017-02-14T19:31:26.000+0000 | 14647 |
Windows Tests.zip | 2016-11-18T17:05:17.000+0000 | 471859 |
test project with 3 bugs: - touchEnabled - zIndex - borderRadius
https://github.com/appcelerator/titanium_mobile_windows/pull/946
Verified fixed, was able to enable and disable
touchEnabled
and see the various effects. IftouchEnabled
was disabled then I was not able to click anything and iftouchEnabled
was enabled I was able to click the various items. Disabled !Disabled.PNG|thumbnail! Enabled !Enabled.PNG|thumbnail! *Environment*^^ Verified using the test case provided in https://github.com/appcelerator/titanium_mobile_windows/pull/946