[TIMOB-1062] Button still sending events while disabled
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2011-04-15T02:42:58.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.4.0 |
Components | Android |
Labels | android, button, defect, enabled, ios, iphone |
Reporter | ctredway |
Assignee | Don Thorp |
Created | 2011-04-15T02:42:56.000+0000 |
Updated | 2017-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);
Disabling buttons works correctly, but Blain says there may be toolbar strangeness. Investigating.
Is this working correctly in the version in HEAD? Because I can recreate this bug in 1.2 & 1.3
It works for me off master/HEAD, yes.
(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...
Re-open if you can duplicate under master/HEAD, and I've somehow missed something.
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?
Closed as invalid.