Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1301] Labels do not honor touchEnabled false

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:55:47.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M04
ComponentsiOS
Labelsdefect, events, ios, labels, release-1.6.0, touch
Reporterctredway
AssigneeBlain Hamon
Created2011-04-15T02:48:50.000+0000
Updated2011-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.

Comments

  1. Stephen Tramer 2011-04-15

    Fixed but not checking in until 1.4 drops. We're in code freeze and this is a minor bug.

  2. zabramny (at gmail) 2011-04-15

    Is there a quick workaround that I could use in the meantime in 1.4? This is something I really need. Thanks.

  3. Stephen Tramer 2011-04-15

    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.

  4. Stephen Tramer 2011-04-15

    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.

  5. Jeff Haynie 2011-04-15

    (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...

  6. PanMan 2011-04-15

    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.

  7. Richard Venneman 2011-04-15

    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..

  8. Stephen Tramer 2011-04-15

    Reopening. Unlikely to be resolved before 1.5.0 because we already have a roadmap.

  9. Stephen Tramer 2011-04-15

    Surprise shocker of the season: Was not resolved for 1.5.0 because we already had a roadmap.

  10. Stephen Tramer 2011-04-15

    May already be resolved (issue between HEAD/1.4.2==1.4.1+TiCore). Investigate.

  11. Stephen Tramer 2011-04-15

    Re-marking resolved. Was fixed in 1.5.0; re-opening was because of the 1.4.2==1.4.1+TiCore problem.

JSON Source