Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1062] Button still sending events while disabled

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2011-04-15T02:42:58.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.4.0
ComponentsAndroid
Labelsandroid, button, defect, enabled, ios, iphone
Reporterctredway
AssigneeDon Thorp
Created2011-04-15T02:42:56.000+0000
Updated2017-03-02T19:21:38.000+0000

Description

A button that has enabled set to false still fires events.

var test_btn = Ti.UI.createButton({

title:'test',
width:100,
height:35,
top:0,
left:0,
enabled:false

});

test_btn.addEventListener('click',function(e){

Ti.API.log('am I firing?');

});

win.add(test_btn);

Comments

  1. Stephen Tramer 2011-04-15

    Disabling buttons works correctly, but Blain says there may be toolbar strangeness. Investigating.

  2. ctredway 2011-04-15

    Is this working correctly in the version in HEAD? Because I can recreate this bug in 1.2 & 1.3

  3. Stephen Tramer 2011-04-15

    It works for me off master/HEAD, yes.

  4. Jeff Haynie 2011-04-15

    (from [24118fb786421474ee3d0a518ef033dea44f527a]) [#1062 state:invalid] Test for disabled button in toolbar. Works as expected. http://github.com/appcelerator/titanium_mobile/commit/24118fb786421474ee3d0a518ef033dea44f527a"> http://github.com/appcelerator/titanium_mobile/commit/24118fb786421...

  5. Stephen Tramer 2011-04-15

    Re-open if you can duplicate under master/HEAD, and I've somehow missed something.

  6. Ryan Asleson 2011-04-15

    Disabling a button works on iPhone but is definitely broken on Android. In the latest KitchenSink, go to /Resources/examples/button.js. Comment out lines 55-59, the setTimeout function. On iPhone you can click the button once to disable it, and once disabled, it no longer responds to events. On Android, click it once to "disable" it, but you can continue to click it and it will respond to the click events.

    Can this bug be reopened or should a new one be filed?

  7. Lee Morris 2017-03-02

    Closed as invalid.

JSON Source