[TIMOB-8606] IOS: TextArea selected event throws exception
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-06-19T21:09:45.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 2.1.0, Sprint 2012-07 |
Components | iOS |
Labels | api, module_textarea, qe-testadded |
Reporter | Vishal Duggal |
Assignee | Vishal Duggal |
Created | 2012-04-06T09:33:19.000+0000 |
Updated | 2013-11-07T05:36:30.000+0000 |
Description
Run this code below. Logs will show the following exception
[TiRange boundBridge:withKrollObject:]: unrecognized selector sent to instance 0x8dc9850
var win1 = Titanium.UI.createWindow({ backgroundColor:'#fff' });
var ta = Ti.UI.createTextArea({
value:'I am a text area',
width:Ti.UI.FILL,
height:100,
borderStyle:Ti.UI.INPUT_BORDERSTYLE_LINE,
borderWidth:1
})
ta.addEventListener('selected',function(e){
Ti.API.info('Selected Fired Location:'+e.range.location+" Length:"+e.range.length)
})
win1.add(ta);
win1.open();
Vishal When testing this I don't see the exception anymore, but I do see that the selected event is being fired twice. Is the expected behavior for the selected event to be fired twice?
We fire the selected event whenever the native OS says that the selection has changed. If the native code reports it twice we report it twice. Nothing in our code is generating the event twice.
Closing issue Tested with Ti Studio build 2.1.0.201206211609 Ti Mobile SDK 2.1.0.v20120622174154 hash rdc9dfbe5 OSX Lion 10.7.3 iPhone 4S OS 5.1 Verified expected behavior is shown
Found this bug again:- In version 2.1.4.GA of Titanium SDK Event is being triggered twice in iPad
Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4876