[TIMOB-1301] Labels do not honor touchEnabled false
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:55:47.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.6.0 M04 |
Components | iOS |
Labels | defect, events, ios, labels, release-1.6.0, touch |
Reporter | ctredway |
Assignee | Blain Hamon |
Created | 2011-04-15T02:48:50.000+0000 |
Updated | 2011-04-17T01:55:47.000+0000 |
Description
var win = Ti.UI.currentWindow;
var cell = Ti.UI.createView();
var title = Ti.UI.createLabel({text:'label
1',touchEnabled:false,height:35,top:0});
var source = Ti.UI.createLabel({text:'label
1',touchEnabled:false,height:35,top:40});
var excerpt = Ti.UI.createLabel({text:'label
1',touchEnabled:false,height:35,top:80});
cell.add(title);
cell.add(source);
cell.add(excerpt);
cell.addEventListener('swipe', function(e){
Ti.API.log(e.source);
});
title.addEventListener('touchstart',function(e){
Ti.API.log('title was touched');
});
win.add(cell);
when run on our latest HEAD on OS 4 the labels still receive touch events.
Fixed but not checking in until 1.4 drops. We're in code freeze and this is a minor bug.
Is there a quick workaround that I could use in the meantime in 1.4? This is something I really need. Thanks.
This will hopefully be fixed by the end of the day. I believe I have the change stashed for post-1.4.0 commit; I will find it and test this afternoon if it exists. Otherwise there is no workaround at this time.
There is one workaround: Check the source of your event. If it's coming from a label, just don't do any event processing for it. This one is going to take some time as it requires work on the entire event propagation system.
(from [9cfa37a1d20203f571577acdb9e27c85ad2d2829]) [#1301 state:resolved] UI elements now both respect default interaction enabling and touchEnabled property. http://github.com/appcelerator/titanium_mobile/commit/9cfa37a1d20203f571577acdb9e27c85ad2d2829"> http://github.com/appcelerator/titanium_mobile/commit/9cfa37a1d2020...
Has this been fixed in the current 1.4.1.1 or only in a later, not yet released, version?
I disagree this being a minor bug: Without this it's not possible to add different pieces of text on a button, which is needed in my design.
This was working in 1.4.1.1 but with the official 1.4.2 release it broke again.
As PanMan says, this can be an important design issue and the active state won't be visible either.
I also tried a 1.5 continuous build but with that my labels won't show at all..
Reopening. Unlikely to be resolved before 1.5.0 because we already have a roadmap.
Surprise shocker of the season: Was not resolved for 1.5.0 because we already had a roadmap.
May already be resolved (issue between HEAD/1.4.2==1.4.1+TiCore). Investigate.
Re-marking resolved. Was fixed in 1.5.0; re-opening was because of the 1.4.2==1.4.1+TiCore problem.